mirror of
https://github.com/microsoft/onefuzz.git
synced 2025-06-14 11:08:06 +00:00
Allow authority to be specified in check-pr (#1473)
* fix interactive login in check-pr * specify tenant domain in check-pr * bug fix * rename tenant to authority
This commit is contained in:
@ -873,13 +873,17 @@ class Run(Command):
|
||||
test_id: UUID,
|
||||
*,
|
||||
endpoint: Optional[str],
|
||||
authority: Optional[str] = None,
|
||||
client_id: Optional[str],
|
||||
client_secret: Optional[str],
|
||||
poll: bool = False,
|
||||
stop_on_complete_check: bool = False,
|
||||
) -> None:
|
||||
self.onefuzz.__setup__(
|
||||
endpoint=endpoint, client_id=client_id, client_secret=client_secret
|
||||
endpoint=endpoint,
|
||||
client_id=client_id,
|
||||
client_secret=client_secret,
|
||||
authority=authority,
|
||||
)
|
||||
tester = TestOnefuzz(self.onefuzz, self.logger, test_id)
|
||||
result = tester.check_jobs(
|
||||
@ -895,9 +899,13 @@ class Run(Command):
|
||||
endpoint: Optional[str],
|
||||
client_id: Optional[str],
|
||||
client_secret: Optional[str],
|
||||
authority: Optional[str] = None,
|
||||
) -> None:
|
||||
self.onefuzz.__setup__(
|
||||
endpoint=endpoint, client_id=client_id, client_secret=client_secret
|
||||
endpoint=endpoint,
|
||||
client_id=client_id,
|
||||
client_secret=client_secret,
|
||||
authority=authority,
|
||||
)
|
||||
tester = TestOnefuzz(self.onefuzz, self.logger, test_id)
|
||||
launch_result, repros = tester.launch_repro()
|
||||
@ -910,6 +918,7 @@ class Run(Command):
|
||||
samples: Directory,
|
||||
*,
|
||||
endpoint: Optional[str] = None,
|
||||
authority: Optional[str] = None,
|
||||
client_id: Optional[str] = None,
|
||||
client_secret: Optional[str] = None,
|
||||
pool_size: int = 10,
|
||||
@ -925,7 +934,10 @@ class Run(Command):
|
||||
|
||||
def try_setup(data: Any) -> None:
|
||||
self.onefuzz.__setup__(
|
||||
endpoint=endpoint, client_id=client_id, client_secret=client_secret
|
||||
endpoint=endpoint,
|
||||
client_id=client_id,
|
||||
client_secret=client_secret,
|
||||
authority=authority,
|
||||
)
|
||||
|
||||
retry(try_setup, "trying to configure")
|
||||
@ -940,11 +952,15 @@ class Run(Command):
|
||||
test_id: UUID,
|
||||
*,
|
||||
endpoint: Optional[str],
|
||||
authority: Optional[str],
|
||||
client_id: Optional[str],
|
||||
client_secret: Optional[str],
|
||||
) -> None:
|
||||
self.onefuzz.__setup__(
|
||||
endpoint=endpoint, client_id=client_id, client_secret=client_secret
|
||||
endpoint=endpoint,
|
||||
client_id=client_id,
|
||||
client_secret=client_secret,
|
||||
authority=authority,
|
||||
)
|
||||
tester = TestOnefuzz(self.onefuzz, self.logger, test_id=test_id)
|
||||
tester.cleanup()
|
||||
@ -954,11 +970,15 @@ class Run(Command):
|
||||
test_id: UUID,
|
||||
*,
|
||||
endpoint: Optional[str],
|
||||
authority: Optional[str] = None,
|
||||
client_id: Optional[str],
|
||||
client_secret: Optional[str],
|
||||
) -> None:
|
||||
self.onefuzz.__setup__(
|
||||
endpoint=endpoint, client_id=client_id, client_secret=client_secret
|
||||
endpoint=endpoint,
|
||||
client_id=client_id,
|
||||
client_secret=client_secret,
|
||||
authority=authority,
|
||||
)
|
||||
tester = TestOnefuzz(self.onefuzz, self.logger, test_id=test_id)
|
||||
tester.check_logs_for_errors()
|
||||
@ -968,6 +988,7 @@ class Run(Command):
|
||||
samples: Directory,
|
||||
*,
|
||||
endpoint: Optional[str] = None,
|
||||
authority: Optional[str] = None,
|
||||
client_id: Optional[str] = None,
|
||||
client_secret: Optional[str] = None,
|
||||
pool_size: int = 15,
|
||||
@ -985,6 +1006,7 @@ class Run(Command):
|
||||
self.launch(
|
||||
samples,
|
||||
endpoint=endpoint,
|
||||
authority=authority,
|
||||
client_id=client_id,
|
||||
client_secret=client_secret,
|
||||
pool_size=pool_size,
|
||||
@ -997,6 +1019,7 @@ class Run(Command):
|
||||
self.check_jobs(
|
||||
test_id,
|
||||
endpoint=endpoint,
|
||||
authority=authority,
|
||||
client_id=client_id,
|
||||
client_secret=client_secret,
|
||||
poll=True,
|
||||
@ -1009,6 +1032,7 @@ class Run(Command):
|
||||
self.check_repros(
|
||||
test_id,
|
||||
endpoint=endpoint,
|
||||
authority=authority,
|
||||
client_id=client_id,
|
||||
client_secret=client_secret,
|
||||
)
|
||||
@ -1018,6 +1042,7 @@ class Run(Command):
|
||||
endpoint=endpoint,
|
||||
client_id=client_id,
|
||||
client_secret=client_secret,
|
||||
authority=authority,
|
||||
)
|
||||
|
||||
except Exception as e:
|
||||
@ -1034,6 +1059,7 @@ class Run(Command):
|
||||
endpoint=endpoint,
|
||||
client_id=client_id,
|
||||
client_secret=client_secret,
|
||||
authority=authority,
|
||||
)
|
||||
except Exception as e:
|
||||
self.logger.error("testing failed: %s", repr(e))
|
||||
|
Reference in New Issue
Block a user