From 702b7806a0f63c85ecd48d25385716ae932cd9ef Mon Sep 17 00:00:00 2001 From: Jeff McCoy Date: Fri, 1 Jul 2022 05:02:49 -0500 Subject: [PATCH] merge in #581 changes --- packages/gitea/gitea-values.yaml | 2 +- packages/gitea/zarf.yaml | 1 + src/cmd/root.go | 3 +- src/internal/helm/destroy.go | 16 +++-- ...general_cli_test.go => 00_use_cli_test.go} | 19 ++++-- ...ce_test.go => 01_component_choice_test.go} | 4 +- ...s_test.go => 02_component_scripts_test.go} | 2 +- ...efore_all_test.go => 20_zarf_init_test.go} | 4 +- ...test.go => 21_component_variables_test.go} | 4 +- ...tion_test.go => 22_data_injection_test.go} | 7 ++- ...mple_game_test.go => 23_dos_games_test.go} | 9 ++- .../e2e/{e2e_helm_test.go => 24_helm_test.go} | 9 ++- ..._example_test.go => 25_git_server_test.go} | 37 ++++++++++- src/test/e2e/26_logging_test.go | 28 +++++++++ ..._sget_test.go => 27_cosign_deploy_test.go} | 9 ++- src/test/e2e/common.go | 26 ++++++-- src/test/e2e/e2e_gitea_and_grafana_test.go | 61 ------------------- src/test/e2e/e2e_zarf_create_test.go | 28 --------- 18 files changed, 147 insertions(+), 122 deletions(-) rename src/test/e2e/{e2e_general_cli_test.go => 00_use_cli_test.go} (80%) rename src/test/e2e/{e2e_component_choice_test.go => 01_component_choice_test.go} (94%) rename src/test/e2e/{e2e_component_scripts_test.go => 02_component_scripts_test.go} (93%) rename src/test/e2e/{e2e__before_all_test.go => 20_zarf_init_test.go} (86%) rename src/test/e2e/{e2e_component_variables_test.go => 21_component_variables_test.go} (90%) rename src/test/e2e/{e2e_data_injection_test.go => 22_data_injection_test.go} (88%) rename src/test/e2e/{e2e_example_game_test.go => 23_dos_games_test.go} (85%) rename src/test/e2e/{e2e_helm_test.go => 24_helm_test.go} (76%) rename src/test/e2e/{e2e_gitops_example_test.go => 25_git_server_test.go} (67%) create mode 100644 src/test/e2e/26_logging_test.go rename src/test/e2e/{e2e_remote_sget_test.go => 27_cosign_deploy_test.go} (64%) delete mode 100644 src/test/e2e/e2e_gitea_and_grafana_test.go delete mode 100644 src/test/e2e/e2e_zarf_create_test.go diff --git a/packages/gitea/gitea-values.yaml b/packages/gitea/gitea-values.yaml index c29399a3da..bdcd505eb0 100644 --- a/packages/gitea/gitea-values.yaml +++ b/packages/gitea/gitea-values.yaml @@ -8,7 +8,7 @@ gitea: config: APP_NAME: "Zarf Gitops Service" server: - ROOT_URL: "http://127.0.0.1:45003" + # ROOT_URL: "http://127.0.0.1:45003" DISABLE_SSH: true OFFLINE_MODE: true database: diff --git a/packages/gitea/zarf.yaml b/packages/gitea/zarf.yaml index 05ec1090a1..8dcba7648c 100644 --- a/packages/gitea/zarf.yaml +++ b/packages/gitea/zarf.yaml @@ -15,5 +15,6 @@ components: valuesFiles: - gitea-values.yaml scripts: + timeoutSeconds: 60 after: - "./zarf tools create-read-only-gitea-user" diff --git a/src/cmd/root.go b/src/cmd/root.go index 1c5081f7ce..13549fcf7e 100644 --- a/src/cmd/root.go +++ b/src/cmd/root.go @@ -24,8 +24,7 @@ var rootCmd = &cobra.Command{ // Disable progress bars for CI envs if os.Getenv("CI") == "true" { message.Debug("CI environment detected, disabling progress bars") - // message.NoProgress = true - message.SetLogLevel(message.TraceLevel) + message.NoProgress = true } }, Short: "Small tool to bundle dependencies with K3s for air-gapped deployments", diff --git a/src/internal/helm/destroy.go b/src/internal/helm/destroy.go index a76554dd19..9b0a2a48b6 100644 --- a/src/internal/helm/destroy.go +++ b/src/internal/helm/destroy.go @@ -45,12 +45,7 @@ func Destroy(purgeAllZarfInstallations bool) { // Filter on zarf releases if zarfPrefix.MatchString(release.Name) { spinner.Updatef("Uninstalling helm chart %s/%s", release.Namespace, release.Name) - // Establish a new actionConfig for the namespace - actionConfig, _ = createActionConfig(release.Namespace, spinner) - // Perform the uninstall - response, err := uninstallChart(actionConfig, release.Name) - message.Debug(response) - if err != nil { + if err = RemoveChart(release.Namespace, release.Name, spinner); err != nil { // Don't fatal since this is a removal action spinner.Errorf(err, "Unable to uninstall the chart") } @@ -59,3 +54,12 @@ func Destroy(purgeAllZarfInstallations bool) { spinner.Success() } + +func RemoveChart(namespace string, name string, spinner *message.Spinner) error { + // Establish a new actionConfig for the namespace + actionConfig, _ := createActionConfig(namespace, spinner) + // Perform the uninstall + response, err := uninstallChart(actionConfig, name) + message.Debug(response) + return err +} diff --git a/src/test/e2e/e2e_general_cli_test.go b/src/test/e2e/00_use_cli_test.go similarity index 80% rename from src/test/e2e/e2e_general_cli_test.go rename to src/test/e2e/00_use_cli_test.go index 0287cfef7e..3584a50cea 100644 --- a/src/test/e2e/e2e_general_cli_test.go +++ b/src/test/e2e/00_use_cli_test.go @@ -1,6 +1,7 @@ package test import ( + "io/ioutil" "os" "os/exec" "testing" @@ -9,8 +10,8 @@ import ( "github.com/stretchr/testify/require" ) -func TestGeneralCLI(t *testing.T) { - t.Log("E2E: Testing general CLI") +func TestUseCLI(t *testing.T) { + t.Log("E2E: Use CLI") e2e.setup(t) defer e2e.teardown(t) @@ -21,7 +22,10 @@ func TestGeneralCLI(t *testing.T) { // output, err = exec.Command("bash", "-c", "\"echo 'random test data 🦄' > shasum-test-file\"").Output() shasumTestFilePath := "shasum-test-file" - e2e.cleanFiles(shasumTestFilePath) + // run `zarf create` with a specified image cache location + imageCachePath := "/tmp/.image_cache-location" + + e2e.cleanFiles(shasumTestFilePath, imageCachePath) testfile, _ := os.Create(shasumTestFilePath) cmd := exec.Command("echo", "random test data 🦄") @@ -58,5 +62,12 @@ func TestGeneralCLI(t *testing.T) { stdOut, stdErr, err = e2e.execZarfCommand("package", "deploy", "https://zarf-examples.s3.amazonaws.com/zarf-package-appliance-demo-doom-20210125.tar.zst", "--confirm") assert.Error(t, err, stdOut, stdErr) - e2e.cleanFiles(shasumTestFilePath) + stdOut, stdErr, err = e2e.execZarfCommand("package", "create", "examples/game", "--confirm", "--zarf-cache", imageCachePath) + require.NoError(t, err, stdOut, stdErr) + + files, err := ioutil.ReadDir(imageCachePath) + require.NoError(t, err, "Error when reading image cache path") + assert.Greater(t, len(files), 1) + + e2e.cleanFiles(shasumTestFilePath, imageCachePath) } diff --git a/src/test/e2e/e2e_component_choice_test.go b/src/test/e2e/01_component_choice_test.go similarity index 94% rename from src/test/e2e/e2e_component_choice_test.go rename to src/test/e2e/01_component_choice_test.go index 2ccd1283dc..68cbef6cce 100644 --- a/src/test/e2e/e2e_component_choice_test.go +++ b/src/test/e2e/01_component_choice_test.go @@ -7,8 +7,8 @@ import ( "github.com/stretchr/testify/require" ) -func TestE2eComponentChoice(t *testing.T) { - t.Log("E2E: Testing component choice") +func TestComponentChoice(t *testing.T) { + t.Log("E2E: Component choice") e2e.setup(t) defer e2e.teardown(t) diff --git a/src/test/e2e/e2e_component_scripts_test.go b/src/test/e2e/02_component_scripts_test.go similarity index 93% rename from src/test/e2e/e2e_component_scripts_test.go rename to src/test/e2e/02_component_scripts_test.go index 1e848625de..ab17540e14 100644 --- a/src/test/e2e/e2e_component_scripts_test.go +++ b/src/test/e2e/02_component_scripts_test.go @@ -7,7 +7,7 @@ import ( "github.com/stretchr/testify/require" ) -func TestE2eComponentScripts(t *testing.T) { +func TestComponentScripts(t *testing.T) { t.Log("E2E: Testing component scripts") e2e.setup(t) defer e2e.teardown(t) diff --git a/src/test/e2e/e2e__before_all_test.go b/src/test/e2e/20_zarf_init_test.go similarity index 86% rename from src/test/e2e/e2e__before_all_test.go rename to src/test/e2e/20_zarf_init_test.go index 2ceda174cc..05d3f0aecc 100644 --- a/src/test/e2e/e2e__before_all_test.go +++ b/src/test/e2e/20_zarf_init_test.go @@ -9,7 +9,8 @@ import ( "github.com/stretchr/testify/require" ) -func TestE2eInitCluster(t *testing.T) { +func TestZarfInit(t *testing.T) { + t.Log("E2E: Zarf init (limit to 10 minutes)") e2e.setup(t) defer e2e.teardown(t) @@ -19,7 +20,6 @@ func TestE2eInitCluster(t *testing.T) { initComponents = "k3s,logging,git-server" } - t.Log("Running `zarf init`, limit to 10 minutes") ctx, cancel := context.WithTimeout(context.TODO(), 10*time.Minute) defer cancel() diff --git a/src/test/e2e/e2e_component_variables_test.go b/src/test/e2e/21_component_variables_test.go similarity index 90% rename from src/test/e2e/e2e_component_variables_test.go rename to src/test/e2e/21_component_variables_test.go index b8687917a6..b914912069 100644 --- a/src/test/e2e/e2e_component_variables_test.go +++ b/src/test/e2e/21_component_variables_test.go @@ -9,8 +9,8 @@ import ( "github.com/stretchr/testify/require" ) -func TestE2eComponentVariables(t *testing.T) { - t.Log("E2E: Testing component variables") +func TestComponentVariables(t *testing.T) { + t.Log("E2E: Component variables") e2e.setup(t) defer e2e.teardown(t) diff --git a/src/test/e2e/e2e_data_injection_test.go b/src/test/e2e/22_data_injection_test.go similarity index 88% rename from src/test/e2e/e2e_data_injection_test.go rename to src/test/e2e/22_data_injection_test.go index d4d173e7e3..777efc5e25 100644 --- a/src/test/e2e/e2e_data_injection_test.go +++ b/src/test/e2e/22_data_injection_test.go @@ -14,7 +14,7 @@ import ( ) func TestDataInjection(t *testing.T) { - t.Log("E2E: Testing data injection") + t.Log("E2E: Data injection") e2e.setup(t) defer e2e.teardown(t) @@ -39,4 +39,9 @@ func TestDataInjection(t *testing.T) { kubectlOut, _ = exec.Command("kubectl", "-n", pod.Namespace, "exec", pod.Name, "--", "ls", "/test/subdirectory-test").Output() assert.Contains(t, string(kubectlOut), "this-is-an-example-file.txt") + + e2e.chartsToRemove = append(e2e.chartsToRemove, ChartTarget{ + namespace: "demo", + name: "zarf-raw-example-data-injection-pod", + }) } diff --git a/src/test/e2e/e2e_example_game_test.go b/src/test/e2e/23_dos_games_test.go similarity index 85% rename from src/test/e2e/e2e_example_game_test.go rename to src/test/e2e/23_dos_games_test.go index e1a784d369..6c6060d893 100644 --- a/src/test/e2e/e2e_example_game_test.go +++ b/src/test/e2e/23_dos_games_test.go @@ -10,8 +10,8 @@ import ( "github.com/stretchr/testify/require" ) -func TestE2eExampleGame(t *testing.T) { - t.Log("E2E: Testing example game") +func TestDosGames(t *testing.T) { + t.Log("E2E: Dos games") e2e.setup(t) defer e2e.teardown(t) @@ -33,4 +33,9 @@ func TestE2eExampleGame(t *testing.T) { resp, err := http.Get(fmt.Sprintf("http://127.0.0.1:%d?doom", localPort)) assert.NoError(t, err, resp) assert.Equal(t, 200, resp.StatusCode) + + e2e.chartsToRemove = append(e2e.chartsToRemove, ChartTarget{ + namespace: "zarf", + name: "zarf-raw-multi-games", + }) } diff --git a/src/test/e2e/e2e_helm_test.go b/src/test/e2e/24_helm_test.go similarity index 76% rename from src/test/e2e/e2e_helm_test.go rename to src/test/e2e/24_helm_test.go index 6806886642..1d6deda7e5 100644 --- a/src/test/e2e/e2e_helm_test.go +++ b/src/test/e2e/24_helm_test.go @@ -9,8 +9,8 @@ import ( "github.com/stretchr/testify/require" ) -func TestE2eExampleHelm(t *testing.T) { - t.Log("E2E: Testing example helm chart") +func TestHelm(t *testing.T) { + t.Log("E2E: Helm chart") e2e.setup(t) defer e2e.teardown(t) @@ -23,4 +23,9 @@ func TestE2eExampleHelm(t *testing.T) { // Verify multiple helm installs of different release names were deployed kubectlOut, _ := exec.Command("kubectl", "get", "pods", "-n=helm-releasename", "--no-headers").Output() assert.Contains(t, string(kubectlOut), "zarf-cool-name-podinfo") + + e2e.chartsToRemove = append(e2e.chartsToRemove, ChartTarget{ + namespace: "demo", + name: "zarf-raw-example-data-injection-pod", + }) } diff --git a/src/test/e2e/e2e_gitops_example_test.go b/src/test/e2e/25_git_server_test.go similarity index 67% rename from src/test/e2e/e2e_gitops_example_test.go rename to src/test/e2e/25_git_server_test.go index ca62578e51..b1ccbbbc74 100644 --- a/src/test/e2e/e2e_gitops_example_test.go +++ b/src/test/e2e/25_git_server_test.go @@ -1,18 +1,23 @@ package test import ( + "encoding/json" "fmt" + "net/http" "os" "os/exec" "strings" "testing" + "github.com/defenseunicorns/zarf/src/config" + "github.com/defenseunicorns/zarf/src/internal/git" + "github.com/defenseunicorns/zarf/src/internal/k8s" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) -func TestGitopsExample(t *testing.T) { - t.Log("E2E: Testing gitops example") +func TestGitServer(t *testing.T) { + t.Log("E2E: Git server") e2e.setup(t) defer e2e.teardown(t) @@ -66,6 +71,34 @@ func TestGitopsExample(t *testing.T) { err = os.Chdir("..") assert.NoError(t, err, "unable to change directories back to blah blah blah") + // Make sure Gitea comes up cleanly + resp, err := http.Get("http://127.0.0.1:45003/explore/repos") + assert.NoError(t, err) + assert.Equal(t, 200, resp.StatusCode) + + // Init the state variable + state := k8s.LoadZarfState() + config.InitState(state) + + // Get the repo as the readonly user + repoName := "mirror__repo1.dso.mil__platform-one__big-bang__apps__security-tools__twistlock" + getRepoRequest, _ := http.NewRequest("GET", fmt.Sprintf("http://%s:%d/api/v1/repos/%v/%v", config.IPV4Localhost, k8s.PortGit, config.ZarfGitPushUser, repoName), nil) + getRepoResponseBody, err := git.DoHttpThings(getRepoRequest, config.ZarfGitReadUser, config.GetSecret(config.StateGitPull)) + assert.NoError(t, err) + + // Make sure the only permissions are pull (read) + var bodyMap map[string]interface{} + json.Unmarshal(getRepoResponseBody, &bodyMap) + permissionsMap := bodyMap["permissions"].(map[string]interface{}) + assert.False(t, permissionsMap["admin"].(bool)) + assert.False(t, permissionsMap["push"].(bool)) + assert.True(t, permissionsMap["pull"].(bool)) + e2e.cleanFiles("mirror__github.com__stefanprodan__podinfo") e2e.cleanFiles("mirror__github.com__defenseunicorns__zarf") + + e2e.chartsToRemove = append(e2e.chartsToRemove, ChartTarget{ + namespace: "zarf", + name: "zarf-gitea", + }) } diff --git a/src/test/e2e/26_logging_test.go b/src/test/e2e/26_logging_test.go new file mode 100644 index 0000000000..e3a8e4875e --- /dev/null +++ b/src/test/e2e/26_logging_test.go @@ -0,0 +1,28 @@ +package test + +import ( + "net/http" + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestLogginga(t *testing.T) { + t.Log("E2E: Logging") + e2e.setup(t) + defer e2e.teardown(t) + + // Establish the port-forward into the logging service + err := e2e.execZarfBackgroundCommand("connect", "logging", "--cli-only") + assert.NoError(t, err, "unable to establish tunnel to logging") + + // Make sure Grafana comes up cleanly + resp, err := http.Get("http://127.0.0.1:45002/monitor/login") + assert.NoError(t, err) + assert.Equal(t, 200, resp.StatusCode) + + e2e.chartsToRemove = append(e2e.chartsToRemove, ChartTarget{ + namespace: "zarf", + name: "zarf-loki-stack", + }) +} diff --git a/src/test/e2e/e2e_remote_sget_test.go b/src/test/e2e/27_cosign_deploy_test.go similarity index 64% rename from src/test/e2e/e2e_remote_sget_test.go rename to src/test/e2e/27_cosign_deploy_test.go index da31f68647..a1f6fc1328 100644 --- a/src/test/e2e/e2e_remote_sget_test.go +++ b/src/test/e2e/27_cosign_deploy_test.go @@ -7,8 +7,8 @@ import ( "github.com/stretchr/testify/require" ) -func TestE2eRemoteSgete(t *testing.T) { - t.Log("E2E: Testing remote sget") +func TestCosignDeploy(t *testing.T) { + t.Log("E2E: Cosign deploy") e2e.setup(t) defer e2e.teardown(t) @@ -17,4 +17,9 @@ func TestE2eRemoteSgete(t *testing.T) { // Deploy the game stdOut, stdErr, err := e2e.execZarfCommand("package", "deploy", path, "--confirm") require.NoError(t, err, stdOut, stdErr) + + e2e.chartsToRemove = append(e2e.chartsToRemove, ChartTarget{ + namespace: "zarf", + name: "zarf-raw-multi-games", + }) } diff --git a/src/test/e2e/common.go b/src/test/e2e/common.go index de7e86beef..f6a0311aa4 100644 --- a/src/test/e2e/common.go +++ b/src/test/e2e/common.go @@ -8,15 +8,23 @@ import ( "testing" "time" + "github.com/defenseunicorns/zarf/src/internal/helm" + "github.com/defenseunicorns/zarf/src/internal/message" "github.com/defenseunicorns/zarf/src/internal/utils" ) // ZarfE2ETest Struct holding common fields most of the tests will utilize type ZarfE2ETest struct { - zarfBinPath string - arch string - applianceMode bool - cmdsToKill []*exec.Cmd + zarfBinPath string + arch string + applianceMode bool + cmdsToKill []*exec.Cmd + chartsToRemove []ChartTarget +} + +type ChartTarget struct { + name string + namespace string } // getCLIName looks at the OS and CPU architecture to determine which Zarf binary needs to be run @@ -37,6 +45,8 @@ func getCLIName() string { // setup actions for each test func (e2e *ZarfE2ETest) setup(t *testing.T) { t.Log("Test setup") + + // utils.ExecCommandWithContext(context.TODO(), true, "kubectl") } // teardown actions for each test @@ -50,7 +60,15 @@ func (e2e *ZarfE2ETest) teardown(t *testing.T) { } } } + + spinner := message.NewProgressSpinner("Remove test helm charts") + for _, chart := range e2e.chartsToRemove { + helm.RemoveChart(chart.namespace, chart.name, spinner) + } + spinner.Success() + e2e.cmdsToKill = []*exec.Cmd{} + e2e.chartsToRemove = []ChartTarget{} } // execZarfCommand executes a Zarf command diff --git a/src/test/e2e/e2e_gitea_and_grafana_test.go b/src/test/e2e/e2e_gitea_and_grafana_test.go deleted file mode 100644 index 18a3167b2d..0000000000 --- a/src/test/e2e/e2e_gitea_and_grafana_test.go +++ /dev/null @@ -1,61 +0,0 @@ -package test - -import ( - "encoding/json" - "fmt" - "net/http" - "testing" - - "github.com/defenseunicorns/zarf/src/config" - "github.com/defenseunicorns/zarf/src/internal/git" - "github.com/defenseunicorns/zarf/src/internal/k8s" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -func TestGiteaAndGrafana(t *testing.T) { - t.Log("E2E: Testing gitea and grafana") - e2e.setup(t) - defer e2e.teardown(t) - - // Deploy the gitops example - path := fmt.Sprintf("build/zarf-package-gitops-service-data-%s.tar.zst", e2e.arch) - stdOut, stdErr, err := e2e.execZarfCommand("package", "deploy", path, "--confirm") - require.NoError(t, err, stdOut, stdErr) - - // Establish the port-forward into the gitea service; give the service a few seconds to come up since this is not a command we can retry - err = e2e.execZarfBackgroundCommand("connect", "git", "--cli-only") - assert.NoError(t, err, "unable to establish tunnel to git") - - // Make sure Gitea comes up cleanly - resp, err := http.Get("http://127.0.0.1:45003/explore/repos") - assert.NoError(t, err) - assert.Equal(t, 200, resp.StatusCode) - - // Establish the port-forward into the logging service - err = e2e.execZarfBackgroundCommand("connect", "logging", "--cli-only") - assert.NoError(t, err, "unable to establish tunnel to logging") - - // Make sure Grafana comes up cleanly - resp, err = http.Get("http://127.0.0.1:45002/monitor/login") - assert.NoError(t, err) - assert.Equal(t, 200, resp.StatusCode) - - // Init the state variable - state := k8s.LoadZarfState() - config.InitState(state) - - // Get the repo as the readonly user - repoName := "mirror__repo1.dso.mil__platform-one__big-bang__apps__security-tools__twistlock" - getRepoRequest, _ := http.NewRequest("GET", fmt.Sprintf("http://%s:%d/api/v1/repos/%v/%v", config.IPV4Localhost, k8s.PortGit, config.ZarfGitPushUser, repoName), nil) - getRepoResponseBody, err := git.DoHttpThings(getRepoRequest, config.ZarfGitReadUser, config.GetSecret(config.StateGitPull)) - assert.NoError(t, err) - - // Make sure the only permissions are pull (read) - var bodyMap map[string]interface{} - json.Unmarshal(getRepoResponseBody, &bodyMap) - permissionsMap := bodyMap["permissions"].(map[string]interface{}) - assert.False(t, permissionsMap["admin"].(bool)) - assert.False(t, permissionsMap["push"].(bool)) - assert.True(t, permissionsMap["pull"].(bool)) -} diff --git a/src/test/e2e/e2e_zarf_create_test.go b/src/test/e2e/e2e_zarf_create_test.go deleted file mode 100644 index 0ed4da6a75..0000000000 --- a/src/test/e2e/e2e_zarf_create_test.go +++ /dev/null @@ -1,28 +0,0 @@ -package test - -import ( - "io/ioutil" - "testing" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -func TestE2eZarfCreate(t *testing.T) { - t.Log("E2E: Testing zarf create") - e2e.setup(t) - defer e2e.teardown(t) - - // run `zarf create` with a specified image cache location - imageCachePath := "/tmp/.image_cache-location" - e2e.cleanFiles(imageCachePath) - - stdOut, stdErr, err := e2e.execZarfCommand("package", "create", "examples/game", "--confirm", "--zarf-cache", imageCachePath) - require.NoError(t, err, stdOut, stdErr) - - files, err := ioutil.ReadDir(imageCachePath) - require.NoError(t, err, "Error when reading image cache path") - assert.Greater(t, len(files), 1) - - e2e.cleanFiles(imageCachePath) -}