-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Adds SOM integration tests for serverless #184888
Adds SOM integration tests for serverless #184888
Conversation
/ci |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
@@ -81,244 +78,213 @@ export default function ({ getService }: FtrProviderContext) { | |||
); | |||
await kibanaServer.savedObjects.cleanStandardList(); | |||
}); | |||
describe('searches', () => { |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
.set(svlCommonApi.getInternalRequestHeader()) | ||
.set(roleAuthc.apiKeyHeader) | ||
.expect(200); | ||
relations1 = body.relations[0]; |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
@wayneseymour they pass for an elasticsearch project: #184888 (comment). I'm testing again for an observability and security project to be sure. |
@elasticmachine merge upstream |
@wayneseymour tests are ok for an o11y project too. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe that if we can change supertest
for supertestWithoutAuth
where we are passing the internal request header and the api key header, this will be good to go.
Thanks Tina!
export default function ({ getService }: FtrProviderContext) { | ||
const svlCommonApi = getService('svlCommonApi'); | ||
const svlUserManager = getService('svlUserManager'); | ||
const supertest = getService('supertest'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this should be supertestWithoutAuth, like this:
const supertestWithoutAuth = getService('supertestWithoutAuth');
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
} | ||
|
||
it('should return 200 for an existing object', async () => | ||
await supertest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be await supertestWithoutAuth
.
\cc @pheyos Please keep me honest here :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. supertest
comes with operator privileges. When we use .set(roleAuthc.apiKeyHeader)
to run with a proper role (like it's done here), we need to use supertestWithoutAuth
instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
})); | ||
|
||
it('should return error for invalid object type', async () => | ||
await supertest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above, should be await supertestWithoutAuth
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
})); | ||
|
||
it('should return mix of successes and errors', async () => | ||
await supertest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above, should be await supertestWithoutAuth
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
export default function ({ getService }: FtrProviderContext) { | ||
const svlCommonApi = getService('svlCommonApi'); | ||
const svlUserManager = getService('svlUserManager'); | ||
const supertest = getService('supertest'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above, should be const supertestWithoutAuth = getService('supertestWithoutAuth');
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} | ||
|
||
it('should return 200 for object that exists and inject metadata', async () => | ||
await supertest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above, should be await supertestWithoutAuth
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
})); | ||
|
||
it('should return error for invalid object type', async () => | ||
await supertest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above, should be await supertestWithoutAuth
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
})); | ||
|
||
it('should return mix of successes and errors', async () => | ||
await supertest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above, should be await supertestWithoutAuth
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@elasticmachine merge upstream |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]
History
To update your PR or re-run it, just comment with: |
As these will directly affect the following Monday's serverless, release, it'd be nice to know if they pass on MKI, as the configs that my team were pinged for in the PR, will be run on MKI @wayneseymour the tests against MKI (using QAF) passed! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just ran the oblt config against MKI, LGTM
fix of #175757
Adds serverless api integration tests for Saved Objects Management