-
Notifications
You must be signed in to change notification settings - Fork 266
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set creator principal id annotation when creating projects and v3 clu…
…sters (#12233) * set principal id annotation when creating projects * set creator principal id when creating kontainer and machine driver clusters * correct kontainer provisioning principal id annotation * add test for project creation * fix projects afterEach hook
- Loading branch information
1 parent
4e0aa07
commit 0f723dd
Showing
7 changed files
with
108 additions
and
8 deletions.
There are no files selected for viewing
42 changes: 42 additions & 0 deletions
42
cypress/e2e/blueprints/explorer/rbac/third-party-principals-get.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
const res = { | ||
type: 'collection', | ||
links: { self: 'https://localhost:8005/v3/principals' }, | ||
actions: { search: 'https://localhost:8005/v3/principals?action=search' }, | ||
pagination: { limit: 1000 }, | ||
sort: { | ||
order: 'asc', | ||
reverse: 'https://localhost:8005/v3/principals?order=desc', | ||
links: { | ||
loginName: 'https://localhost:8005/v3/principals?sort=loginName', name: 'https://localhost:8005/v3/principals?sort=name', principalType: 'https://localhost:8005/v3/principals?sort=principalType', profilePicture: 'https://localhost:8005/v3/principals?sort=profilePicture', profileURL: 'https://localhost:8005/v3/principals?sort=profileURL', provider: 'https://localhost:8005/v3/principals?sort=provider', uuid: 'https://localhost:8005/v3/principals?sort=uuid' | ||
} | ||
}, | ||
filters: { | ||
created: null, creatorId: null, id: null, loginName: null, me: null, memberOf: null, name: null, principalType: null, profilePicture: null, profileURL: null, provider: null, removed: null, uuid: null | ||
}, | ||
resourceType: 'principal', | ||
data: [ | ||
{ | ||
baseType: 'principal', | ||
created: null, | ||
creatorId: null, | ||
id: 'github://1234567890', | ||
links: { self: 'https://localhost:8005/v3/principals/github:%2F%2F1234567890' }, | ||
loginName: 'admin', | ||
me: true, | ||
memberOf: false, | ||
name: 'Default Admin', | ||
principalType: 'user', | ||
provider: 'github', | ||
type: 'principal' | ||
} | ||
] | ||
}; | ||
|
||
export function spoofThirdPartyPrincipal(): Cypress.Chainable<Response> { | ||
return cy.intercept('GET', '/v3/principals', (req) => { | ||
req.reply({ | ||
statusCode: 200, | ||
body: res | ||
}); | ||
}).as('spoofThirdPartyPrincipal'); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters