MCPcopy Create free account
hub / github.com/cloudbase/garm / TestCreatingEndpoint

Method TestCreatingEndpoint

database/sql/github_test.go:81–96  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

79}
80
81func (s *GithubTestSuite) TestCreatingEndpoint() {
82 ctx := garmTesting.ImpersonateAdminContext(context.Background(), s.db, s.T())
83
84 createEpParams := params.CreateGithubEndpointParams{
85 Name: testEndpointName,
86 Description: testEndpointDescription,
87 APIBaseURL: testAPIBaseURL,
88 UploadBaseURL: testUploadBaseURL,
89 BaseURL: testBaseURL,
90 }
91
92 endpoint, err := s.db.CreateGithubEndpoint(ctx, createEpParams)
93 s.Require().NoError(err)
94 s.Require().NotNil(endpoint)
95 s.Require().Equal(testEndpointName, endpoint.Name)
96}
97
98func (s *GithubTestSuite) TestCreatingDuplicateEndpointFails() {
99 ctx := garmTesting.ImpersonateAdminContext(context.Background(), s.db, s.T())

Callers

nothing calls this directly

Calls 1

CreateGithubEndpointMethod · 0.65

Tested by

no test coverage detected