MCPcopy
hub / github.com/1Password/for-open-source / setTestApplication

Function setTestApplication

script/testing.go:179–204  ·  view source on GitHub ↗
(testName string)

Source from the content-addressed store, hash-verified

177}
178
179func setTestApplication(testName string) {
180 application, err := findTestApplication(testName)
181 if err != nil {
182 log.Fatalf(err.Error())
183 }
184
185 debugMessage(fmt.Sprintf("Testing application named '%s'", testName))
186
187 var issue github.Issue
188 if err := loadIssue(&issue); err != nil {
189 log.Fatalf(err.Error())
190 }
191
192 if err := setIssueProperties(application, &issue); err != nil {
193 log.Fatalf(err.Error())
194 }
195
196 if err := os.Setenv("APPROVER_ID", "123"); err != nil {
197 log.Fatalf("Failed to set environment variable: %s", err)
198 }
199 if err := os.Setenv("APPROVER_USERNAME", "wendyappleseed"); err != nil {
200 log.Fatalf("Failed to set environment variable: %s", err)
201 }
202
203 testIssue = &issue
204}
205
206func errSliceEqual(a, b []error) bool {
207 if len(a) != len(b) {

Callers 3

TestApplication_ParseFunction · 0.85
mainFunction · 0.85

Calls 5

findTestApplicationFunction · 0.85
debugMessageFunction · 0.85
loadIssueFunction · 0.85
setIssuePropertiesFunction · 0.85
ErrorMethod · 0.80

Tested by 2

TestApplication_ParseFunction · 0.68