From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp31.i.mail.ru (smtp31.i.mail.ru [94.100.177.91]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 8D04D469719 for ; Fri, 13 Nov 2020 17:01:06 +0300 (MSK) Date: Fri, 13 Nov 2020 14:01:05 +0000 From: Nikita Pettik Message-ID: <20201113140105.GA32615@tarantool.org> References: <20201110112913.28083-1-sergos@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20201110112913.28083-1-sergos@tarantool.org> Subject: Re: [Tarantool-patches] [PATCH] sql: forbid data changes in read-only mode List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: sergos@tarantool.org Cc: tarantool-patches@dev.tarantool.org On 10 Nov 14:29, sergos@tarantool.org wrote: > From: Sergey Ostanevich > > +box.execute("ALTER TABLE TEST ADD CONSTRAINT 'uk' UNIQUE (B)") > +test:is( > + tostring(err), > + expected_err, > + "add constraint should fail in read-only mode" > +) > +box.execute("ALTER TABLE TEST RENAME TO TEST2") > +test:is( > + tostring(err), > + expected_err, > + "rename should fail in read-only mode" > +) > +res, err = box.execute("DROP TABLE TEST") > +test:is( > + tostring(err), > + expected_err, > + "drop table should fail in read-only mode" > +) > + > +-- cleanup > +box.cfg{read_only=false} > +res, err = box.execute("DROP TABLE TEST") > + > +os.exit(test:check() and 0 or 1) Not sure if we have to call os.exit() at the end of tap tests. Otherwise LGTM