mirror of
https://github.com/edgelesssys/constellation.git
synced 2024-12-13 18:04:20 -05:00
376bc6d39f
The tool has an e2e test and is part of our production pipeline.
51 lines
1.2 KiB
Python
51 lines
1.2 KiB
Python
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
|
|
load("//bazel/go:go_test.bzl", "go_test")
|
|
load("//bazel/sh:def.bzl", "sh_template")
|
|
|
|
go_binary(
|
|
name = "cli",
|
|
embed = [":cli_lib"],
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
|
|
go_library(
|
|
name = "cli_lib",
|
|
srcs = [
|
|
"delete.go",
|
|
"main.go",
|
|
],
|
|
importpath = "github.com/edgelesssys/constellation/v2/internal/api/attestationconfigapi/cli",
|
|
visibility = ["//visibility:private"],
|
|
deps = [
|
|
"//internal/api/attestationconfigapi",
|
|
"//internal/constants",
|
|
"//internal/logger",
|
|
"//internal/staticupload",
|
|
"@com_github_spf13_cobra//:cobra",
|
|
"@org_uber_go_zap//:zap",
|
|
],
|
|
)
|
|
|
|
go_test(
|
|
name = "cli_test",
|
|
srcs = [
|
|
"delete_test.go",
|
|
"main_test.go",
|
|
],
|
|
embed = [":cli_lib"],
|
|
deps = [
|
|
"//internal/api/attestationconfigapi",
|
|
"@com_github_stretchr_testify//assert",
|
|
"@com_github_stretchr_testify//require",
|
|
],
|
|
)
|
|
|
|
sh_template(
|
|
name = "cli_e2e_test",
|
|
data = [":cli"],
|
|
substitutions = {
|
|
"@@CONFIGAPI_CLI@@": "$(rootpath :cli)",
|
|
},
|
|
template = "e2e/test.sh.in",
|
|
)
|