github.com/weaviate/weaviate@v1.24.6/test/acceptance/graphql_resolvers/network_get_meta_test.go (about)

     1  //                           _       _
     2  // __      _____  __ ___   ___  __ _| |_ ___
     3  // \ \ /\ / / _ \/ _` \ \ / / |/ _` | __/ _ \
     4  //  \ V  V /  __/ (_| |\ V /| | (_| | ||  __/
     5  //   \_/\_/ \___|\__,_| \_/ |_|\__,_|\__\___|
     6  //
     7  //  Copyright © 2016 - 2024 Weaviate B.V. All rights reserved.
     8  //
     9  //  CONTACT: hello@weaviate.io
    10  //
    11  
    12  package test
    13  
    14  // import (
    15  // 	"encoding/json"
    16  // 	"testing"
    17  
    18  // 	"github.com/weaviate/weaviate/test/helper"
    19  // 	"github.com/stretchr/testify/assert"
    20  // )
    21  
    22  // func TestNetworkMeta(t *testing.T) {
    23  // 	result := AssertGraphQL(t, helper.RootAuth, `
    24  // 		{
    25  // 			Network {
    26  // 				Meta{
    27  // 					RemoteWeaviateForAcceptanceTest {
    28  // 						Things {
    29  // 							Instruments {
    30  // 								volume {
    31  // 									maximum
    32  // 									minimum
    33  // 									mean
    34  // 								}
    35  // 							}
    36  // 						}
    37  // 					}
    38  // 				}
    39  // 			}
    40  // 		}
    41  // 	`)
    42  
    43  // 	volume := result.Get("Network", "Meta", "RemoteWeaviateForAcceptanceTest", "Things", "Instruments", "volume").Result
    44  // 	expected := map[string]interface{}{
    45  // 		"mean":    json.Number("82"),
    46  // 		"maximum": json.Number("110"),
    47  // 		"minimum": json.Number("65"),
    48  // 	}
    49  // 	assert.Equal(t, expected, volume)
    50  // }