Skip to content

Commit

Permalink
chore: use a license during e2e tests
Browse files Browse the repository at this point in the history
in order to capture problems with the embedded license we need to use a
version of the embedded cluster binary with an embedded kots license.
  • Loading branch information
ricardomaraschini committed Nov 8, 2023
1 parent cd77654 commit d47b65a
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ jobs:
external_ids:ovn-remote=unix:/var/run/ovn/ovnsb_db.sock \
external_ids:ovn-encap-type=geneve \
external_ids:ovn-encap-ip=127.0.0.1
- name: Install binutils
run: |
sudo apt-get install -y binutils
- name: Setup Go
uses: actions/setup-go@v4
with:
Expand Down
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ pkg/goods/bins/embedded-cluster/kubectl-preflight:
tar -xzf output/tmp/preflight/preflight.tar.gz -C output/tmp/preflight
mv output/tmp/preflight/preflight pkg/goods/bins/embedded-cluster/kubectl-preflight

license.yaml:
cp e2e/test-license.yaml license.yaml

.PHONY: embed-license
embed-license: embedded-cluster-linux-amd64 license.yaml
mkdir -p output/tmp
Expand Down Expand Up @@ -133,14 +136,14 @@ vet: static-linux-amd64 static
go vet ./...

.PHONY: e2e-tests
e2e-tests: embedded-cluster-linux-amd64
e2e-tests: embed-license
mkdir -p output/tmp
rm -rf output/tmp/id_rsa*
ssh-keygen -t rsa -N "" -C "Integration Test Key" -f output/tmp/id_rsa
go test -timeout 45m -parallel 1 -failfast -v ./e2e

.PHONY: e2e-test
e2e-test: embedded-cluster-linux-amd64
e2e-test: embed-license
mkdir -p output/tmp
rm -rf output/tmp/id_rsa*
ssh-keygen -t rsa -N "" -C "Integration Test Key" -f output/tmp/id_rsa
Expand Down
27 changes: 27 additions & 0 deletions e2e/test-license.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
apiVersion: kots.io/v1beta1
kind: License
metadata:
name: embeddedclusterintegrationtests
spec:
appSlug: embedded-cluster-smoke-test-app
channelID: 2Xt5IoImUY2W8eo5DWZEdtA5Yr1
channelName: Stable
customerName: Embedded Cluster Integration Tests
endpoint: https://replicated.app
entitlements:
expires_at:
description: License Expiration
signature: {}
title: Expiration
value: ""
valueType: String
isGitOpsSupported: true
isHelmVmDownloadEnabled: true
isKotsInstallEnabled: true
isNewKotsUiEnabled: true
isSemverRequired: true
isSnapshotSupported: true
licenseID: 2Xt5q15MDpLvaO15UZ5XhKxBqB1
licenseSequence: 1
licenseType: prod
signature: eyJsaWNlbnNlRGF0YSI6ImV5SmhjR2xXWlhKemFXOXVJam9pYTI5MGN5NXBieTkyTVdKbGRHRXhJaXdpYTJsdVpDSTZJa3hwWTJWdWMyVWlMQ0p0WlhSaFpHRjBZU0k2ZXlKdVlXMWxJam9pWlcxaVpXUmtaV1JqYkhWemRHVnlhVzUwWldkeVlYUnBiMjUwWlhOMGN5SjlMQ0p6Y0dWaklqcDdJbXhwWTJWdWMyVkpSQ0k2SWpKWWREVnhNVFZOUkhCTWRtRlBNVFZWV2pWWWFFdDRRbkZDTVNJc0lteHBZMlZ1YzJWVWVYQmxJam9pY0hKdlpDSXNJbU4xYzNSdmJXVnlUbUZ0WlNJNklrVnRZbVZrWkdWa0lFTnNkWE4wWlhJZ1NXNTBaV2R5WVhScGIyNGdWR1Z6ZEhNaUxDSmhjSEJUYkhWbklqb2laVzFpWldSa1pXUXRZMngxYzNSbGNpMXpiVzlyWlMxMFpYTjBMV0Z3Y0NJc0ltTm9ZVzV1Wld4SlJDSTZJakpZZERWSmIwbHRWVmt5VnpobGJ6VkVWMXBGWkhSQk5WbHlNU0lzSW1Ob1lXNXVaV3hPWVcxbElqb2lVM1JoWW14bElpd2liR2xqWlc1elpWTmxjWFZsYm1ObElqb3hMQ0psYm1Sd2IybHVkQ0k2SW1oMGRIQnpPaTh2Y21Wd2JHbGpZWFJsWkM1aGNIQWlMQ0psYm5ScGRHeGxiV1Z1ZE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