Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ci): more e2e tests #63

Merged
merged 10 commits into from
May 20, 2024
Merged

chore(ci): more e2e tests #63

merged 10 commits into from
May 20, 2024

Conversation

emosbaugh
Copy link
Member

No description provided.

create-object-store/action.yml Outdated Show resolved Hide resolved
create-postgres/action.yml Outdated Show resolved Hide resolved
expose-port/action.yml Outdated Show resolved Hide resolved
Comment on lines +87 to +105
kots-config-values: |
apiVersion: kots.io/v1beta1
kind: ConfigValues
metadata:
name: nginx
spec:
values:
api_token:
value: r8yWQ/cUeLVprKGKZb2gpE5IcQ0Tep1iaNwn7078
example_default_value:
default: please change this value
value: testing
hidden_text:
value: lPiIJL1RfL4v/YKzHfnx/9HyR2x4t5wnVxSLmzJlmf12HlqlyBoSfnvd0O+mftiT8h0+kumsBqc=
readonly_text_left:
value: 8WIAQHZW_G
show_text_inputs:
default: "0"
value: "1"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this have to be inline? If so, I assume we should improve the kots install action

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess it can be a file, so maybe here just use the file (avoiding duplication)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made it inline for more coverage since it supports both. I also wasnt sure how the env var would behave with a multi line string.

kubernetes-distribution: kind
timeout-minutes: 5

- name: test expose-port
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Idea: before exposing a port, run a kubectl apply and install nginx with a nodeport service.
After expose-port, verify with curl the exposed port.
Or would this be beyond testing the action?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We test this in cmx e2e tests

.github/workflows/test-create-postgres.yml Outdated Show resolved Hide resolved
.github/workflows/test-archive-customer.yml Outdated Show resolved Hide resolved
Comment on lines +42 to +57
- name: test archive-channel
id: archive-channel
uses: ./archive-channel
with:
api-token: ${{ secrets.REPLICATED_API_TOKEN }}
app-slug: replicated-actions-ci # from the Replicated QA team
channel-slug: ${{ steps.create-release.outputs.channel-slug }}

- name: archive-channel
if: always()
uses: replicatedhq/compatibility-actions/archive-channel@v1
continue-on-error: true # It could be that the channel is already removed
with:
api-token: ${{ secrets.REPLICATED_API_TOKEN }}
app-slug: replicated-actions-ci # from the Replicated QA team
channel-slug: ${{ steps.create-release.outputs.channel-slug }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If archive-channel is broken, this will result in orphaned channels.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is from the stable branch replicatedhq/compatibility-actions/archive-channel@v1 to avoid orphaned channels. see on line 44 is the actual test

const name: string = core.getInput('name');
const helmPath: string = core.getInput("helm-path", { required: true });
const kubeconfig: string = core.getInput("kubeconfig", { required: true });
const namespace: string = core.getInput("namespace", { required: true }) || "default";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does this work, if it is required and has a default?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure its possible but i feel like it cant hurt

@emosbaugh emosbaugh merged commit 4182967 into main May 20, 2024
14 checks passed
@emosbaugh emosbaugh deleted the emosbaugh/e2e-more-tests-1 branch May 20, 2024 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants