// Create the secret that would be generated by CLO normally
Create the secret that would be generated by CLO normally
// Create the secret that would be generated by CLO normally
func createRequiredSecret(f *framework.Framework, ctx *framework.TestCtx) error {
	namespace, err := ctx.GetNamespace()
	if err != nil {
		return fmt.Errorf("Could not get namespace: %v", err)
	}
	elasticsearchSecret := utils.Secret(
		elasticsearchCRName,
		namespace,
		map[string][]byte{
			"elasticsearch.key": utils.GetFileContents("test/files/elasticsearch.key"),
			"elasticsearch.crt": utils.GetFileContents("test/files/elasticsearch.crt"),
			"logging-es.key":    utils.GetFileContents("test/files/logging-es.key"),
			"logging-es.crt":    utils.GetFileContents("test/files/logging-es.crt"),
			"admin-key":         utils.GetFileContents("test/files/system.admin.key"),
			"admin-cert":        utils.GetFileContents("test/files/system.admin.crt"),
			"admin-ca":          utils.GetFileContents("test/files/ca.crt"),
		},
	)
	err = f.Client.Create(goctx.TODO(), elasticsearchSecret, &framework.CleanupOptions{TestContext: ctx, Timeout: cleanupTimeout, RetryInterval: cleanupRetryInterval})
	if err != nil {
		return err
	}
	return nil
}
func createRequiredSecret ( f * framework . Framework , ctx * framework . TestCtx ) error { namespace , err := ctx . GetNamespace ( ) if err != nil { return fmt . Errorf ( " " , err ) } elasticsearchSecret := utils . Secret ( elasticsearchCRName , namespace , map [ string ] [ ] byte { " " : utils . GetFileContents ( " " ) , " " : utils . GetFileContents ( " " ) , " " : utils . GetFileContents ( " " ) , " " : utils . GetFileContents ( " " ) , " " : utils . GetFileContents ( " " ) , " " : utils . GetFileContents ( " " ) , " " : utils . GetFileContents ( " " ) , } , ) err = f . Client . Create ( goctx . TODO ( ) , elasticsearchSecret , & framework . CleanupOptions { TestContext : ctx , Timeout : cleanupTimeout , RetryInterval : cleanupRetryInterval } ) if err != nil { return err } return nil }
Create the secret that would be generated by CLO normally
Create the secret that would be generated by CLO normally