Raj Kamal Singh a295bf2fb6
Feat: QS: structure for built in integrations (#4655)
* feat: get builtin integrations started with nginx

* feat: get started with embedding and parsing of builtin integrations

* chore: add icons for nginx and redis integrations

* chore: stash current state of work

* chore: remove all yaml annotations since moved to JSON assets for bundled integrations

* chore: add file uri hydration in integration spec

* chore: refactor file uri hydration logic

* chore: add support for referencing JSON files with file uri

* chore: bring in initial integration assets

* chore: hookup builtin integrations and get all tests passing

* chore: update icons for postgres and mongo and some cleanup

* chore: some more cleanup

---------

Co-authored-by: Raj Singh <raj@Rajs-MacBook-Pro.local>
2024-03-07 19:26:20 +05:30

33 lines
682 B
Go

package integrations
import (
"context"
"strings"
"testing"
"github.com/stretchr/testify/require"
)
func TestBuiltinIntegrations(t *testing.T) {
require := require.New(t)
repo := BuiltInIntegrations{}
builtins, apiErr := repo.list(context.Background())
require.Nil(apiErr)
require.Greater(
len(builtins), 0,
"some built in integrations are expected to be bundled.",
)
nginxIntegrationId := "builtin::nginx"
res, apiErr := repo.get(context.Background(), []string{
nginxIntegrationId,
})
require.Nil(apiErr)
nginxIntegration, exists := res[nginxIntegrationId]
require.True(exists)
require.False(strings.HasPrefix(nginxIntegration.Overview, "file://"))
}