hotfix(constants/providers): remove TestWorkflowHasAll to decouple CI files from tests

This commit is contained in:
Quentin McGaw
2026-03-04 22:09:36 +00:00
parent b1da4c4b86
commit d8a3cc3dfa
@@ -1,12 +1,9 @@
package providers
import (
"os"
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"gopkg.in/yaml.v3"
)
func Test_All(t *testing.T) {
@@ -24,33 +21,3 @@ func Test_AllWithCustom(t *testing.T) {
assert.Contains(t, all, Custom)
assert.Len(t, all, len(All())+1)
}
func TestWorkflowHasAll(t *testing.T) {
t.Parallel()
const path = "../../../.github/workflows/update-servers-list.yml"
file, err := os.Open(path)
require.NoError(t, err)
defer file.Close()
var data struct {
On struct {
WorkflowDispatch struct {
Inputs struct {
Provider struct {
Options []string `yaml:"options"`
} `yaml:"provider"`
} `yaml:"inputs"`
} `yaml:"workflow_dispatch"`
} `yaml:"on"`
}
decoder := yaml.NewDecoder(file)
err = decoder.Decode(&data)
require.NoError(t, err)
providers := All()
expected := make([]string, len(providers)+1)
expected[0] = "all"
copy(expected[1:], providers)
assert.Equal(t, expected, data.On.WorkflowDispatch.Inputs.Provider.Options)
}