...

Source file src/github.com/go-kivik/kivik/v4/x/fsdb/test/fs.go

Documentation: github.com/go-kivik/kivik/v4/x/fsdb/test

     1  // Licensed under the Apache License, Version 2.0 (the "License"); you may not
     2  // use this file except in compliance with the License. You may obtain a copy of
     3  // the License at
     4  //
     5  //  http://www.apache.org/licenses/LICENSE-2.0
     6  //
     7  // Unless required by applicable law or agreed to in writing, software
     8  // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
     9  // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
    10  // License for the specific language governing permissions and limitations under
    11  // the License.
    12  
    13  // Package test configures the integration test suite.
    14  package test
    15  
    16  import (
    17  	"net/http"
    18  
    19  	"github.com/go-kivik/kivik/v4"
    20  	"github.com/go-kivik/kivik/v4/kiviktest"
    21  	"github.com/go-kivik/kivik/v4/kiviktest/kt"
    22  )
    23  
    24  func registerFSSuite() {
    25  	kiviktest.RegisterSuite(kiviktest.SuiteKivikFS, kt.SuiteConfig{
    26  		"AllDBs.expected": []string{},
    27  
    28  		"CreateDB/RW/NoAuth.status":         http.StatusUnauthorized,
    29  		"CreateDB/RW/Admin/Recreate.status": http.StatusPreconditionFailed,
    30  
    31  		"AllDocs.skip": true, // FIXME: Not yet implemented
    32  		// "AllDocs/Admin.databases":  []string{"foo"},
    33  		// "AllDocs/Admin/foo.status": http.StatusNotFound,
    34  
    35  		"DBExists/Admin.databases":       []string{"chicken"},
    36  		"DBExists/Admin/chicken.exists":  false,
    37  		"DBExists/RW/group/Admin.exists": true,
    38  
    39  		"AllDBsStats.expected": []*kivik.DBStats{},
    40  
    41  		"DestroyDB/RW/Admin/NonExistantDB.status": http.StatusNotFound,
    42  
    43  		"Version.version":        `^0\.0\.1$`,
    44  		"Version.vendor":         "Kivik",
    45  		"Version.vendor_version": `^0\.0\.1$`,
    46  
    47  		// Replications not to be implemented
    48  		"GetReplications.skip": true,
    49  		"Replicate.skip":       true,
    50  
    51  		"Get/RW/group/Admin/bogus.status":  http.StatusNotFound,
    52  		"Get/RW/group/NoAuth/bogus.status": http.StatusNotFound,
    53  
    54  		"GetRev.skip":            true,                      // FIXME: Unimplemented
    55  		"Flush.skip":             true,                      // FIXME: Unimplemented
    56  		"Delete.skip":            true,                      // FIXME: Unimplemented
    57  		"Stats.skip":             true,                      // FIXME: Unimplemented
    58  		"CreateDoc.skip":         true,                      // FIXME: Unimplemented
    59  		"Compact.skip":           true,                      // FIXME: Unimplemented
    60  		"Security.skip":          true,                      // FIXME: Unimplemented
    61  		"DBUpdates.status":       http.StatusNotImplemented, // FIXME: Unimplemented
    62  		"Changes.skip":           true,                      // FIXME: Unimplemented
    63  		"Copy.skip":              true,                      // FIXME: Unimplemented, depends on Get/Put or Copy
    64  		"BulkDocs.skip":          true,                      // FIXME: Unimplemented
    65  		"GetAttachment.skip":     true,                      // FIXME: Unimplemented
    66  		"GetAttachmentMeta.skip": true,                      // FIXME: Unimplemented
    67  		"PutAttachment.skip":     true,                      // FIXME: Unimplemented
    68  		"DeleteAttachment.skip":  true,                      // FIXME: Unimplemented
    69  		"Query.skip":             true,                      // FIXME: Unimplemented
    70  		"Find.skip":              true,                      // FIXME: Unimplemented
    71  		"Explain.skip":           true,                      // FIXME: Unimplemented
    72  		"CreateIndex.skip":       true,                      // FIXME: Unimplemented
    73  		"GetIndexes.skip":        true,                      // FIXME: Unimplemented
    74  		"DeleteIndex.skip":       true,                      // FIXME: Unimplemented
    75  
    76  		"Put/RW/Admin/group/LeadingUnderscoreInID.status":  http.StatusBadRequest,
    77  		"Put/RW/Admin/group/Conflict.status":               http.StatusConflict,
    78  		"Put/RW/NoAuth/group/LeadingUnderscoreInID.status": http.StatusBadRequest,
    79  		"Put/RW/NoAuth/group/DesignDoc.status":             http.StatusUnauthorized,
    80  		"Put/RW/NoAuth/group/Conflict.status":              http.StatusConflict,
    81  
    82  		"SetSecurity.skip": true, // FIXME: Unimplemented
    83  		"ViewCleanup.skip": true, // FIXME: Unimplemented
    84  		"Rev.skip":         true, // FIXME: Unimplemented
    85  	})
    86  }
    87  

View as plain text