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

     1  luci.project(
     2      name = "project",
     3      buildbucket = "cr-buildbucket.appspot.com",
     4      milo = "luci-milo.appspot.com",
     5      swarming = "chromium-swarm.appspot.com",
     6  )
     7  
     8  luci.bucket(name = "ci")
     9  
    10  luci.recipe(
    11      name = "main/recipe",
    12      cipd_package = "recipe/bundles/main",
    13  )
    14  
    15  luci.builder(
    16      name = "b",
    17      bucket = "ci",
    18      executable = "main/recipe",
    19  )
    20  
    21  luci.list_view(
    22      name = "View",
    23      entries = [
    24          "b",
    25          luci.list_view_entry("b"),
    26      ],
    27  )
    28  
    29  # Expect errors like:
    30  #
    31  # Traceback (most recent call last):
    32  #   //testdata/errors/list_view_dup_builder.star: in <toplevel>
    33  #   ...
    34  # Error: builder luci.builder("ci/b") was already added to luci.list_view("View"), previous declaration:
    35  # Traceback (most recent call last):
    36  #   //testdata/errors/list_view_dup_builder.star: in <toplevel>
    37  #   ...