blob: 0e9bf27f2826de969b25152f524bbcafc1868267 [file]
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
!kubectl -n nuvolaris delete all --all
!kubectl -n nuvolaris delete pvc --all
import nuvolaris.config as cfg
import nuvolaris.testutil as tu
import nuvolaris.couchdb as cdb
tu.load_image_env()
assert(cfg.configure(tu.load_sample_config()))
cfg.detect()
#cfg.put("couchdb.host", "couchdb")
cdb.create(None)
r = %system kubectl -n nuvolaris wait --for=condition=complete job/couchdb-init --timeout="600s"
assert(r[0].find("condition met") != -1)
r = %system kubectl -n nuvolaris logs -l job=couchdb-init | grep "OK: enable_db_compaction: subjects"
assert(r[1].find("OK:") != -1)