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: Update IntegrationTest flag #66

Merged
merged 1 commit into from
Dec 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
ssh-private-key: ${{ secrets.SDK_REPO_PRIVATE_KEY }}
- name: Build and Test
env:
CLIENT_TOKEN: ${{ secrets.KONFIDENS_CLIENT_TOKEN }}
CLIENT_TOKEN: ${{ secrets.CONFIDENCE_CLIENT_TOKEN }}
run: scripts/run_tests.sh $CLIENT_TOKEN

SwiftLint:
Expand Down
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ You can automatically format your code using:
### Running tests

IT tests require a Confidence client token to reach remote servers. The token can be created on the Confidence portal.
The Confidence organization used for IT tests is named `konfidens-e2e` (you may need to request access).
The Confidence organization used for IT tests is named `confidence-test` (you may need to request access).

The tests use the flag `test-flag-1` and the client key can be found under `Swift Provider - E2E Tests` in the console.
The tests use the flag `swift-flag-test` and the enabled client name is `swift-provider-e2e`.

To run the tests:

Expand All @@ -36,7 +36,7 @@ Alternatively, you can store the client token in your local keychain, allowing y

To store the token, run the following (replacing `CLIENT_TOKEN`):
```shell
security add-generic-password -s 'Swift Provider - E2E Tests' -a 'konfidens-e2e' -w 'CLIENT_TOKEN'
security add-generic-password -s 'swift-provider-e2e' -a 'confidence-test' -w 'CLIENT_TOKEN'
```

You can then run the script as follows (note: you may need to allow access to the keychain on the first run):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class ConfidenceIntegrationTests: XCTestCase {
if let flag = ProcessInfo.processInfo.environment["TEST_FLAG_NAME"], !flag.isEmpty {
return flag
}
return "test-flag-1"
return "swift-test-flag"
}

override func setUp() async throws {
Expand Down
4 changes: 2 additions & 2 deletions scripts/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ script_dir=$(dirname $0)
root_dir="$script_dir/../"

# Set the client token in your local keychain using the following command:
# security add-generic-password -s 'Swift Provider - E2E Tests' -a 'konfidens-e2e' -w 'TOKEN'
# security add-generic-password -s 'swift-provider-e2e' -a 'confidence-test' -w 'TOKEN'
# You can then run the script with no arguments - you will need to allow access the first time only.
test_runner_client_token=$1
if [[ -z "${test_runner_client_token// }" ]]; then
test_runner_client_token=$(security find-generic-password -w -s 'Swift Provider - E2E Tests' -a 'konfidens-e2e')
test_runner_client_token=$(security find-generic-password -w -s 'swift-provider-e2e' -a 'confidence-test')
fi

(cd $root_dir &&
Expand Down
Loading