mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 13:31:54 +00:00
This is the end of the PR train to remove the enterprise directory from out repo since we have consolidated to use a single license. Bye rough code split :)
44 lines
1.4 KiB
Python
44 lines
1.4 KiB
Python
load("//dev:go_defs.bzl", "go_test")
|
|
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
|
|
|
|
go_library(
|
|
name = "app-token_lib",
|
|
srcs = ["main.go"],
|
|
importpath = "github.com/sourcegraph/sourcegraph/dev/ci/scripts/app-token",
|
|
visibility = ["//visibility:private"],
|
|
deps = [
|
|
"//lib/errors",
|
|
"@com_github_golang_jwt_jwt//:jwt",
|
|
"@com_github_google_go_github_v47//github",
|
|
"@org_golang_x_oauth2//:oauth2",
|
|
],
|
|
)
|
|
|
|
go_binary(
|
|
name = "app-token",
|
|
embed = [":app-token_lib"],
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
|
|
go_test(
|
|
name = "app-token_test",
|
|
srcs = ["main_test.go"],
|
|
embed = [":app-token_lib"],
|
|
env = {"BUILDKITE": "true"},
|
|
tags = [
|
|
# ==================== Test output for //dev/ci/scripts/app-token:app-token_test:
|
|
# 2023/02/23 01:51:39 GET https://api.github.com/orgs/sourcegraph/installation: 401 A JSON web token could not be decoded []
|
|
# TODO(bazel): fix test; failing due to missing auth token
|
|
"manual",
|
|
# Test reaches out to https://api.github.com/orgs/sourcegraph/installation
|
|
"requires-network",
|
|
],
|
|
deps = [
|
|
"//internal/httptestutil",
|
|
"@com_github_dnaeon_go_vcr//cassette",
|
|
"@com_github_google_go_github_v47//github",
|
|
"@com_github_stretchr_testify//require",
|
|
"@org_golang_x_oauth2//:oauth2",
|
|
],
|
|
)
|