Skip to content

Commit

Permalink
chore: use env for google api tests (#25)
Browse files Browse the repository at this point in the history
Make use of the existing env variables for google api tests context
  • Loading branch information
datYori authored Jul 7, 2023
1 parent 7a1fc9f commit e089560
Showing 1 changed file with 2 additions and 29 deletions.
31 changes: 2 additions & 29 deletions raw-creds-api/src/test/scala/raw/creds/OAuth2TestCreds.scala
Original file line number Diff line number Diff line change
Expand Up @@ -138,38 +138,11 @@ trait OAuth2TestCreds {
options = Map("accounts_url" -> "https://accounts.zoho.com")
)

lazy val googleApiSecretKey = """-----BEGIN PRIVATE KEY-----
|MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCRDqELW46y/PNW
|YTbL7KnZVkLTwNFbOlWaK0FK7a3xYHrjVPQpxunHPheqAkxIPKpBkfhuR4CW/uf2
|txNAiD0cwDhIxNxuh1ObmeyuPWPffEnmOVjTV0h5RbOjK4gJjcfj2QNWa+Skj0lN
|mkszGsgzYDMyjFPd9XCmfTyqwJ0pCSsseVenbXDU9dhx02CxiwFEbDHQ/gn8Mq6N
|dXWhS2eQaxxoV+t4TaICDvt3Oh02pUD2q70KHckHxKPXD1M/nOIElpb7q1NzvL2g
|8GJf8ggw9pxu12HsCNvekz3fyZMJeF9GEQ1Oy2dVQ+NU5FBu0g3kpximTaI/lWOB
|SgLDwKKdAgMBAAECggEACaoX2lHdtNjCV0PGCtm+inE2cpuq8MRDzJaLlLQEasvE
|ZD3WWd8CCsXjfbtsqanUQU1Tmyu+ylChbWabk1xNKT7SGscPu+CrfJDjNZirFspV
|6IJzNvsRvdxO/TtHpptNPhKVwYqrgrgPm9DNdQVlYUbl7yNthjqo24hsilPa8YJ5
|LoUN9z/zEKn+OJZKh7l2GP1H5WAMQLf0zeji4NgOOiGsAb6d+zWOx/fRijJuW9Du
|05uu2uTTE3rtz+yNfbCfgYawL798qoY5SNi26WNlyklDyxj1w+9eta/VxnhZ+Wim
|mY140eBfoM2awR+5benOI2/YkS64ybh6/rXmT0GTYQKBgQDG/mnHkyJXIbE9UYE/
|2KMeYG6qBwEeGTjE60/6ZBxhv3RKafI30EXWgUZp1S9JTTJAIq354l7S19hbEeSy
|oFMVLyIIocGmb0aZr00vOJOlxNaQGiTfGEGMeF7+NXgfAX8jMP9mTzuhW+4H4LN8
|SBdSyh/Cbb0g4UxWiRF1TjSgwwKBgQC6nKtNIURl7fnoLaiHlrmsVrTHJAvVzAcw
|3UldBoJ4yh9EPQAf5YxSWveqX6zk5mUnBdfoSuVCn0ucR2uBiMqTBC7xyOfqh+dU
|fytUDPeesEjfhEKkZ5lgjQgk14yenDkF644W2tAhdfrX3rRKZKPiwhfAucdcYd6V
|mbRdgLd5HwKBgQCq5fw6piYr5oetPb5e8tLEV9UyuOlAzDBxDhaV2Dx3xlE9R1f6
|jygrXML4SVpe/alWY3I+1SbStQTe0bMzpXU1EFGOUD1bjt13R5JmJ5TGHRKYl5tq
|7g39cbNDZvBO0J47vuzZFNsFbUo0AcqjxdYiB+zWsiBniJZjCzyvHgccuQKBgFev
|xIKSrjwjLbnesoE73vVPLNUiZ/lHTN22LYHrzCUL/NMowsU6LMyJ+DRzjp9kb4V9
|pm19u+qpRXMi0C5m46FfZtuwJuG6iIXY17g/+57ygNuen133XEfVHU2Kh4YELHtO
|q06r9P60HHGRMTB/x86Gm3ixEy+iwV+UgP8qu4vLAoGBAJ/XobTvVDdrQaeKEXk+
|ZbRjvt5hXe4HDYyTOARiLUQ7Y0ogtUm+8Emr2a/6AKBnpwBOsfsvTzUrz3uBSHJK
|aoSzfDbVgZB8UxPHSHzis4j9Mb5rFyiHMzCS0KOLvMT49EUpPdutTPGEHvG0O9qn
|ejEhgOFcsY01FMv+t+TEVSX9
|-----END PRIVATE KEY-----""".stripMargin
lazy val googleApiSecretKey = sys.env("RAW_GOOGLE_TEST_API_SECRET_KEY").stripMargin

lazy val googleApiClientCredentials = ClientCredentialsCredential(
OAuth2Provider.GoogleApi,
clientId = "109689905160732121522",
clientId = sys.env("RAW_GOOGLE_TEST_API_CLIENT_ID"),
clientSecret = googleApiSecretKey,
options = Map(
"scope" -> "https://www.googleapis.com/auth/analytics.readonly",
Expand Down

0 comments on commit e089560

Please sign in to comment.