sh8s_deployer/test/IntegrationTests/main.cpp
2024-08-13 14:55:32 +02:00

77 lines
1.5 KiB
C++

// deployer IntegrationTests main
// Copyright (C) 2024 Jean-Cloud
// GNU General Public License v3
#include <iostream>
#include "BashManager.h"
using namespace std;
void Help()
{
cout << "blabla" << endl;
}
//tests
void environmentTest()
{
cout << "Test of the environment setup." << endl;
}
void bashTest()
{
cout << "Test of BashModule" << endl;
}
void dockerTest()
{
cout << "Test of DockerModule" << endl;
}
void nginxTest()
{
cout << "Test of Nginx module" << endl;
}
void wireguardTest()
{
cout << "Test of WireguardModule" << endl;
}
void encryptionTest()
{
cout << "Test of EncryptionModule" << endl;
}
int main(int argc, char **argv)
{
if(argc!=2){
cerr << "Invalid number of arguments." << endl;
} else{
BashManager::Execute("./deployer deploy all");
string action=argv[1];
if (action=="environment"){
environmentTest();
} else if (action=="bash"){
bashTest();
} else if (action=="docker"){
dockerTest();
} else if (action=="nginx"){
nginxTest();
} else if (action=="wireguard"){
wireguardTest();
} else if (action=="encryption"){
encryptionTest();
} else if (action=="all"){
environmentTest();
bashTest();
dockerTest();
nginxTest();
wireguardTest();
encryptionTest();
} else {
cerr << "Unknown argument." << endl;
Help();
}
}
}