func updateTestAuthenticationFromToken(tcs []model.TestCase, rts []RequiredTokens) []model.TestCase {
	for _, rt := range rts {
		for x, tc := range tcs {
			for _, id := range rt.IDs {
				if id == tc.ID {
					reqConsent, err := tc.Context.GetString("requestConsent")
					if err == nil && len(reqConsent) > 0 {
						continue
					}

					tc.InjectBearerToken("$" + rt.Name)
					tcs[x] = tc
				}
			}
		}
	}
	return tcs
}
// sets testCase Bearer Header to match requested consent token - for non-consent tests
sets testCase Bearer Header to match requested consent token - for non-consent tests
// sets testCase Bearer Header to match requested consent token - for non - consent tests
func updateTestAuthenticationFromToken(tcs []model.TestCase, rts []RequiredTokens) []model.TestCase {
	for _, rt := range rts {
		for x, tc := range tcs {
			for _, id := range rt.IDs {
				if id == tc.ID {
					reqConsent, err := tc.Context.GetString("requestConsent")
					if err == nil && len(reqConsent) > 0 {
						continue
					}
					tc.InjectBearerToken("$" + rt.Name)
					tcs[x] = tc
				}
			}
		}
	}
	return tcs
}
func updateTestAuthenticationFromToken ( tcs [ ] model . TestCase , rts [ ] RequiredTokens ) [ ] model . TestCase { for _ , rt := range rts { for x , tc := range tcs { for _ , id := range rt . IDs { if id == tc . ID { reqConsent , err := tc . Context . GetString ( " " ) if err == nil && len ( reqConsent ) > 0 { continue } tc . InjectBearerToken ( " " + rt . Name ) tcs [ x ] = tc } } } } return tcs }
sets testCase Bearer Header to match requested consent token - for non-consent tests
sets testCase Bearer Header to match requested consent token - for non - consent tests