Esempio n. 1
0
        public async Task Check()
        {
            var client = pstep.sshClient.Connect(await pstep.GetPiloteSshConnection());
            var result = client.Command("dotnet --version");

            StepAssert.StartsWith(result, "2");
        }
Esempio n. 2
0
        public async Task Check()
        {
            var result = commandExecute.Command("docker run --rm hello-world");

            StepAssert.Contains("Hello from Docker!", result);
            await Task.CompletedTask;
        }
Esempio n. 3
0
        public async Task Check()
        {
            var client = pstep.sshClient.Connect(await pstep.GetPiloteSshConnection());
            var result = client.Command("curl http://127.0.0.1:8200/v1/");

            StepAssert.Contains("{", result);
        }
Esempio n. 4
0
        public async Task Check()
        {
            pstep.sshClient.Connect(await pstep.GetPiloteSshConnection());
            var result = pstep.sshClient.Command("curl http://localhost:4999/v2/");

            StepAssert.AreEqual("{}", result);
        }
Esempio n. 5
0
        public async Task Check()
        {
            await Task.CompletedTask;

            //cmdDocker.ImageExists(name,tag)
            StepAssert.IsTrue(false);
        }
Esempio n. 6
0
        public async Task Check()
        {
            var client = pstep.sshClient.Connect(await pstep.GetPiloteSshConnection());

            var result = client.Command("cd ~/ci && git config --get remote.origin.url");

            StepAssert.Contains("https://github.com/emallard/ci.git", result);
        }
Esempio n. 7
0
        public async Task Check()
        {
            pstep.sshClient.Connect(await pstep.GetPiloteSshConnection());
            var result = pstep.sshClient.Command("docker run --rm hello-world");

            StepAssert.Contains("Hello from Docker!", result);
            await Task.CompletedTask;
        }
Esempio n. 8
0
        public async Task Check()
        {
            IAuthenticationInfo auth = new UserPasswordAuthenticationInfo(
                await listAsk.LocalVaultDevopUser.Ask(),
                await listAsk.LocalVaultDevopPassword.Ask());

            StepAssert.IsTrue(null != await listResources.CAKey.Read(auth));
            StepAssert.IsTrue(null != await listResources.CAPem.Read(auth));
        }
Esempio n. 9
0
        public async Task Check()
        {
            var client = pstep.sshClient.Connect(await pstep.GetPiloteSshConnection());

            // is image here
            var result = client.Command("docker images");

            StepAssert.Contains("ciexe", result);

            // try to run an image
            result = client.Command("docker run --rm --name ciexe ciexe hello");
            StepAssert.Contains("hello", result);
        }
Esempio n. 10
0
        public async Task Check()
        {
            // Check that devopuser can write and read a secret
            var devopUser = await listAsk.LocalVaultDevopUser.Ask();

            var devopPass = await listAsk.LocalVaultDevopPassword.Ask();

            var client = storeResolver.CreateClient("vault", new UserPasswordAuthenticationInfo(devopUser, devopPass));
            var guid   = Guid.NewGuid().ToString();
            await client.WriteSecretAsync("secret/devop/test", guid);

            StepAssert.AreEqual(guid, await client.ReadSecretAsync("secret/devop/test"));
        }
Esempio n. 11
0
        public async Task Check()
        {
            var apikey = await listAsk.InfraApiKey.Ask();

            var webServerUser = await listAsk.WebServerAdminUser.Ask();

            var webServerPassword = await listAsk.WebServerAdminPassword.Ask();

            var client = sshClient.Connect(infrastructure.GetVmSshConnection(apikey, "webServer", webServerUser, webServerPassword));
            var result = client.Command("echo coucou");

            StepAssert.AreEqual("coucou\n", result);
            await Task.CompletedTask;
        }
Esempio n. 12
0
        public void Check(ICommandExecute execute)
        {
            StepAssert.Contains("\"initialized\":true,\"sealed\":false", execute.Command("curl http://localhost:8200/v1/sys/health"));

            // login for test user
            var data     = " --data '{\"password\": \"test\"}' ";
            var loginCmd = "curl --request POST " + data + " http://127.0.0.1:8200/v1/auth/userpass/login/test ";

            dynamic loginResponse = JObject.Parse(execute.Command(loginCmd));
            var     token         = (string)loginResponse.auth.client_token;

            StepAssert.IsTrue(!string.IsNullOrWhiteSpace(token));

            /*
             * // Try to read the test value with the test user/password
             * var header = " --header \"X-Vault-Token: " + token + "\" ";
             * var readCmd = "curl " + token + " http://127.0.0.1:8200/v1/secret/test";
             * var readCmdResponse = execute.Command(readCmd);
             * StepAssert.AreEqual("testValue", readCmdResponse);
             */
        }
Esempio n. 13
0
        public void Check(ICommandExecute commandExecute)
        {
            var cmdResponse = commandExecute.Command("curl -s 127.0.0.1:8080");

            StepAssert.Contains("<a href=\"/dashboard/\">", cmdResponse);
        }