load("@io_bazel_rules_go//go:def.bzl", "go_library")
load("//bazel/go:go_test.bzl", "go_test")

go_library(
    name = "client",
    srcs = [
        "api.go",
        "autoscaler.go",
        "client.go",
        "config.go",
        "instanceview.go",
        "nodeimage.go",
        "pendingnode.go",
        "providerid.go",
        "scalinggroup.go",
        "vmss.go",
    ],
    importpath = "github.com/edgelesssys/constellation/v2/operators/constellation-node-operator/v2/internal/cloud/azure/client",
    visibility = ["//operators/constellation-node-operator:__subpackages__"],
    deps = [
        "//internal/constants",
        "//internal/mpimage",
        "//operators/constellation-node-operator/api/v1alpha1",
        "//operators/constellation-node-operator/internal/cloud/api",
        "//operators/constellation-node-operator/internal/poller",
        "@com_github_azure_azure_sdk_for_go_sdk_azcore//:azcore",
        "@com_github_azure_azure_sdk_for_go_sdk_azcore//runtime",
        "@com_github_azure_azure_sdk_for_go_sdk_azcore//to",
        "@com_github_azure_azure_sdk_for_go_sdk_azidentity//:azidentity",
        "@com_github_azure_azure_sdk_for_go_sdk_resourcemanager_compute_armcompute_v5//:armcompute",
        "@com_github_spf13_afero//:afero",
    ],
)

go_test(
    name = "client_test",
    srcs = [
        "client_test.go",
        "config_test.go",
        "instanceview_test.go",
        "nodeimage_test.go",
        "pendingnode_test.go",
        "providerid_test.go",
        "scalinggroup_test.go",
        "vmss_test.go",
    ],
    embed = [":client"],
    deps = [
        "//internal/constants",
        "//operators/constellation-node-operator/api/v1alpha1",
        "//operators/constellation-node-operator/internal/cloud/api",
        "//operators/constellation-node-operator/internal/poller",
        "@com_github_azure_azure_sdk_for_go_sdk_azcore//:azcore",
        "@com_github_azure_azure_sdk_for_go_sdk_azcore//runtime",
        "@com_github_azure_azure_sdk_for_go_sdk_azcore//to",
        "@com_github_azure_azure_sdk_for_go_sdk_resourcemanager_compute_armcompute_v5//:armcompute",
        "@com_github_spf13_afero//:afero",
        "@com_github_stretchr_testify//assert",
        "@com_github_stretchr_testify//require",
    ],
)
