Skip to content

Commit

Permalink
Fix Swift scaler E2E test enviroment variables (#1747)
Browse files Browse the repository at this point in the history
Signed-off-by: Pedro Felipe Dominguite <p.dominguite@sidi.org.br>
  • Loading branch information
pdominguite authored Apr 19, 2021
1 parent aefaba8 commit 33c3cdb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
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

0 comments on commit 33c3cdb

Please sign in to comment.