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

test(integration): fix test cases for integrations #875

Merged
merged 2 commits into from
Nov 27, 2024
Merged
Changes from 1 commit
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
14 changes: 11 additions & 3 deletions integration-test/pipeline/rest-integration.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,16 @@ export function CheckIntegrations() {
});

var id = "github";
var cdef = http.request("GET", `${pipelinePublicHost}/v1beta/connector-definitions/${id}`, null, null).
json().connectorDefinition;
var cdefs = http.request("GET", `${pipelinePublicHost}/v1beta/component-definitions?pageSize=100`, null, null).
jvallesm marked this conversation as resolved.
Show resolved Hide resolved
json().componentDefinitions;

var cdef = null;
for (var i = 0; i < cdefs.length; i++) {
if (cdefs[i].id === id) {
cdef = cdefs[i];
break;
}
}

var integration = {
uid: cdef.uid,
Expand All @@ -45,7 +53,7 @@ export function CheckIntegrations() {
var oAuthConfig = {
authUrl: "https://github.com/login/oauth/authorize",
accessUrl: "https://github.com/login/oauth/access_token",
scopes: ["repo", "write:repo_hook"],
scopes: ["repo", "admin:repo_hook"],
};

// Basic view
Expand Down
Loading