mirror of
https://github.com/neilotoole/sq.git
synced 2024-12-20 06:31:32 +03:00
98b47a2666
* refactor: moved cli flags to pkg cli/flag * testh: add OptLongDB for long-running tests * implement 'sq config dir' * legacy dir migration: probably a bad idea * cleanup * Refactored SQ_CONFIG and --config * added yaml writer * Dialing in tests * YAML output for 'sq driver ls' * Significant refactoring of config * Minor test for ioz * Rename source.Set to source.Collection * Cleaning up references to source.Set
19 lines
342 B
Go
19 lines
342 B
Go
package ioz_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/neilotoole/sq/libsq/core/ioz"
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func TestMarshalYAML(t *testing.T) {
|
|
m := map[string]any{
|
|
"hello": `sqlserver://sakila:p_ss"**W0rd@222.75.174.219?database=sakila`,
|
|
}
|
|
|
|
b, err := ioz.MarshalYAML(m)
|
|
require.NoError(t, err)
|
|
require.NotNil(t, b)
|
|
}
|