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

ci/cd: add integration tests #10

Open
kamilsk opened this issue Nov 19, 2023 · 0 comments
Open

ci/cd: add integration tests #10

kamilsk opened this issue Nov 19, 2023 · 0 comments
Assignees
Labels
effort: easy An issue is easy to implement. impact: high An issue has high impact. scope: inventory An issue related to auxiliary code, e.g. CI config, Makefiles, etc. scope: test An issue related to tests. type: improvement A new improvement proposal.

Comments

@kamilsk
Copy link
Member

kamilsk commented Nov 19, 2023

Motivation: healthcheck.

PoC

#!/bin/bash

# URL to check
url="http://example.com"

# Expected redirect location
expected_redirect="http://example.com/new-location"

# Send a request and extract the actual redirect location
actual_redirect=$(curl -Ls -o /dev/null -w %{url_effective} "$url")

# Compare the actual redirect location with the expected one
if [ "$actual_redirect" = "$expected_redirect" ]; then
    echo "Redirect is correct: $actual_redirect"
else
    echo "Redirect is incorrect: Expected $expected_redirect, but got $actual_redirect"
fi
@kamilsk kamilsk added type: improvement A new improvement proposal. scope: test An issue related to tests. scope: inventory An issue related to auxiliary code, e.g. CI config, Makefiles, etc. impact: high An issue has high impact. effort: easy An issue is easy to implement. labels Nov 19, 2023
@kamilsk kamilsk self-assigned this Nov 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort: easy An issue is easy to implement. impact: high An issue has high impact. scope: inventory An issue related to auxiliary code, e.g. CI config, Makefiles, etc. scope: test An issue related to tests. type: improvement A new improvement proposal.
Projects
None yet
Development

No branches or pull requests

1 participant