iceberg-cpp
Loading...
Searching...
No Matches
docker_compose_util.h
1/*
2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License. You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied. See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
18 */
19
20#pragma once
21
22#include <filesystem>
23#include <string>
24#include <vector>
25
27
28namespace iceberg {
29
32 public:
37 DockerCompose(std::string project_name, std::filesystem::path docker_compose_dir);
38
40
41 DockerCompose(const DockerCompose&) = delete;
42 DockerCompose& operator=(const DockerCompose&) = delete;
43 DockerCompose(DockerCompose&&) = default;
44 DockerCompose& operator=(DockerCompose&&) = default;
45
47 const std::string& project_name() const { return project_name_; }
48
51 void Up();
52
55 void Down();
56
57 private:
58 std::string project_name_;
59 std::filesystem::path docker_compose_dir_;
60
64 Command BuildDockerCommand(const std::vector<std::string>& args) const;
65};
66
67} // namespace iceberg
A shell command builder and executor for tests.
Definition cmd_util.h:33
Docker Compose orchestration utilities for integration testing.
Definition docker_compose_util.h:31
void Down()
Executes 'docker-compose down' to stop and remove services.
Definition docker_compose_util.cc:38
void Up()
Executes 'docker-compose up' to start services.
Definition docker_compose_util.cc:33
const std::string & project_name() const
Get the docker project name.
Definition docker_compose_util.h:47