go.chromium.org/luci@v0.0.0-20240309015107-7cdc2e660f33/lucicfg/testdata/tricium/invalid_multi_cq_groups.star (about)

     1  luci.project(
     2      name = "foo",
     3      tricium = "tricium-prod.appspot.com",
     4  )
     5  
     6  luci.cq_group(
     7      name = "watching repo1",
     8      watch = cq.refset("https://example.googlesource.com/repo1"),
     9      acls = [
    10          acl.entry(acl.CQ_COMMITTER, groups = ["committer"]),
    11      ],
    12      verifiers = [
    13          luci.cq_tryjob_verifier(
    14              builder = "infra:analyzer/spell-checker",
    15              mode_allowlist = [cq.MODE_ANALYZER_RUN],
    16          ),
    17      ],
    18  )
    19  
    20  luci.cq_group(
    21      name = "watching repo2",
    22      watch = cq.refset("https://example.googlesource.com/repo2"),
    23      acls = [
    24          acl.entry(acl.CQ_COMMITTER, groups = ["committer"]),
    25      ],
    26      verifiers = [
    27          luci.cq_tryjob_verifier(
    28              builder = "infra:analyzer/spell-checker",
    29              mode_allowlist = [cq.MODE_ANALYZER_RUN],
    30          ),
    31      ],
    32  )
    33  
    34  # Expect errors like:
    35  #
    36  # Traceback (most recent call last):
    37  #   //testdata/tricium/invalid_multi_cq_groups.star: in <toplevel>
    38  #   ...
    39  # Error: luci.cq_group("watching repo2") is watching different set of Gerrit repos or defining different analyzers from luci.cq_group("watching repo1")