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

Fix Swift scaler E2E test enviroment variables #1747

Merged
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
4 changes: 2 additions & 2 deletions tests/scalers/openstack-swift.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ test.serial('Deployment should be scaled to 0 after deleting all objects in cont
t.fail(`Could not delete all objects inside container to test scaling to zero. Swift API returned: ${response}`)
}

for (let i = 0; i < 20 && replicaCount !== '0'; i++) {
for (let i = 0; i < 30 && replicaCount !== '0'; i++) {
replicaCount = sh.exec(
`kubectl get deployment.apps/${deploymentName} --namespace ${testNamespace} -o jsonpath="{.spec.replicas}"`
).stdout
Expand All @@ -227,7 +227,7 @@ test.serial('Deployment should be scaled to 0 after deleting all objects in cont
t.is(
replicaCount,
'0',
'Replica count should be 0 after creating ScaledObject'
'Replica count should be 0 after deleting all objects in container'
)
} catch (err) {
t.fail(err.message)
Expand Down
10 changes: 5 additions & 5 deletions tests/scalers/openstack/openstack-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const requestTimeout = 30000

const keystoneClient: AxiosInstance = axios.create({
url: '/v3/auth/tokens',
baseURL: process.env['OS_AUTH_URL'],
baseURL: process.env['OPENSTACK_AUTH_URL'],
timeout: requestTimeout
})

Expand Down Expand Up @@ -47,7 +47,7 @@ class OpenstackHelperClient {
// It will use the service URL provided by the user. If not provided, it will look for the URL into the Openstack catalog
private static async getCredentials(osServiceName: string, osServiceURL ?: string): Promise<Credentials> {
const credentials = <Credentials>{}
const osRegion = process.env['OS_REGION_NAME']
const osRegion = process.env['OPENSTACK_REGION_NAME']

try {
const response = await keystoneClient.request({
Expand All @@ -61,14 +61,14 @@ class OpenstackHelperClient {
],
"password": {
"user": {
"id": process.env['OS_USER_ID'],
"password": process.env['OS_PASSWORD']
"id": process.env['OPENSTACK_USER_ID'],
"password": process.env['OPENSTACK_PASSWORD']
}
}
},
"scope": {
"project": {
"id": process.env['OS_PROJECT_ID']
"id": process.env['OPENSTACK_PROJECT_ID']
}
}
}
Expand Down