Skip to content

Commit

Permalink
ci: add "ci" to e2e test namespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
3u13r committed Dec 6, 2024
1 parent 9a0d717 commit b74cba6
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ jobs:
--image-replacements workspace/just.containerlookup \
--namespace-file workspace/e2e.namespace \
--platform ${{ inputs.platform }} \
--skip-undeploy="${{ inputs.skip-undeploy && 'true' || 'false' }}"
--skip-undeploy="${{ inputs.skip-undeploy && 'true' || 'false' }}" \
--namespace-suffix="-ci"
- name: Download logs
if: always()
run: |
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/e2e_aks_runtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ jobs:
--image-replacements workspace/just.containerlookup \
--namespace-file workspace/e2e.namespace \
--platform AKS-CLH-SNP \
--skip-undeploy="false"
--skip-undeploy="false" \
--namespace-suffix="-ci"
- name: Download logs
if: always()
run: |
Expand Down
2 changes: 1 addition & 1 deletion e2e/aks-runtime/aks_runtime_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func TestAKSRuntime(t *testing.T) {
require.NoError(err)
imageReplacements, err := kuberesource.ImageReplacementsFromFile(f)
require.NoError(err)
namespace := contrasttest.MakeNamespace(t)
namespace := contrasttest.MakeNamespace(t, contrasttest.Flags.NamespaceSuffix)

// Log versions
kataPolicyGenV, err := az.KataPolicyGenVersion()
Expand Down
2 changes: 2 additions & 0 deletions e2e/internal/contrasttest/contrasttest.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,15 @@ type testFlags struct {
PlatformStr string
ImageReplacementsFile string
NamespaceFile string
NamespaceSuffix string
SkipUndeploy bool
}

// RegisterFlags registers the flags that are shared between all tests.
func RegisterFlags() {
flag.StringVar(&Flags.ImageReplacementsFile, "image-replacements", "", "path to image replacements file")
flag.StringVar(&Flags.NamespaceFile, "namespace-file", "", "file to store the namespace in")
flag.StringVar(&Flags.NamespaceSuffix, "namespace-suffix", "", "suffix to append to the namespace")
flag.StringVar(&Flags.PlatformStr, "platform", "", "Deployment platform")
flag.BoolVar(&Flags.SkipUndeploy, "skip-undeploy", false, "Skip undeploying the test namespace")
}
Expand Down
3 changes: 2 additions & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ e2e target=default_deploy_target platform=default_platform: soft-clean coordinat
--image-replacements ./{{ workspace_dir }}/just.containerlookup \
--namespace-file ./{{ workspace_dir }}/just.namespace \
--platform {{ platform }} \
--skip-undeploy=true
--skip-undeploy=true \
--namespace-suffix=${namespace_suffix-}
# Generate policies, apply Kubernetes manifests.
deploy target=default_deploy_target cli=default_cli platform=default_platform: (runtime target platform) (apply "runtime") (populate target platform) (generate cli platform) (apply target)
Expand Down

0 comments on commit b74cba6

Please sign in to comment.