✅🩹 — Update tests and code after dependencies upgrade
This commit is contained in:
parent
4f0b7a7a94
commit
6b505f3e6d
10
Makefile
10
Makefile
|
@ -5,10 +5,10 @@ XGETTEXT ?= carton exec local/bin/xgettext.pl -u
|
|||
CARTON ?= carton exec
|
||||
REAL_LUFI ?= script/application
|
||||
LUFI ?= script/lufi
|
||||
LDAP_CONTAINER_IMAGE ?= rroemhild/test-openldap:latest
|
||||
LDAP_CONTAINER_IMAGE ?= docker.io/rroemhild/test-openldap:latest
|
||||
LOCAL_LDAP_PORT ?= 10389
|
||||
LOCAL_SWIFT_PORT ?= 8080
|
||||
SWIFT_CONTAINER_IMAGE ?= swiftstack/picoswiftstack:latest
|
||||
SWIFT_CONTAINER_IMAGE ?= docker.io/openstackswift/saio:latest
|
||||
MORBO_HOST ?= 0.0.0.0
|
||||
MORBO_PORT ?= 3000
|
||||
|
||||
|
@ -33,15 +33,15 @@ dev: clean
|
|||
$(CARTON) morbo $(LUFI) --listen http://$(MORBO_HOST):$(MORBO_PORT) --watch lib/ --watch script/ --watch themes/ --watch lufi.conf
|
||||
|
||||
ldap:
|
||||
sudo docker run -d -p $(LOCAL_LDAP_PORT):10389 $(LDAP_CONTAINER_IMAGE); exit 0
|
||||
podman run -d -p $(LOCAL_LDAP_PORT):10389 $(LDAP_CONTAINER_IMAGE); exit 0
|
||||
|
||||
ldapdev: ldap dev
|
||||
|
||||
swift:
|
||||
sudo docker run -d --rm -p $(LOCAL_SWIFT_PORT):8080 --hostname="picoswiftstack" --name="picoswiftstack" $(SWIFT_CONTAINER_IMAGE); exit 0
|
||||
podman run -d --rm -p $(LOCAL_SWIFT_PORT):8080 --hostname="picoswiftstack" --name="picoswiftstack" $(SWIFT_CONTAINER_IMAGE); exit 0
|
||||
@echo "Sleeping 20 seconds to let picoswiftstack start"
|
||||
@sleep 20
|
||||
sudo docker exec picoswiftstack get_auth
|
||||
podman exec picoswiftstack get_auth
|
||||
|
||||
swiftdev: swift dev
|
||||
|
||||
|
|
|
@ -191,7 +191,7 @@ sub startup {
|
|||
->name('config');
|
||||
|
||||
# Generated js files
|
||||
$r->get('/partial/:file')
|
||||
$r->get('/partial/<:file>.<:ext>')
|
||||
->to('Misc#js_files')
|
||||
->name('partial');
|
||||
|
||||
|
|
|
@ -140,7 +140,7 @@ sub store {
|
|||
|
||||
# Write file
|
||||
my $file = catfile($c->app->config('upload_dir'), $c->get_path());
|
||||
Mojo::File->new($file)->spurt($text);
|
||||
Mojo::File->new($file)->spew($text);
|
||||
}
|
||||
|
||||
return $c;
|
||||
|
|
8
t/test.t
8
t/test.t
|
@ -269,13 +269,13 @@ sub test_login {
|
|||
}
|
||||
|
||||
sub restore_config {
|
||||
$config_file->spurt($config_orig);
|
||||
$config_file->spew($config_orig);
|
||||
}
|
||||
|
||||
sub switch_to_htpasswd {
|
||||
$config_content = $config_orig;
|
||||
$config_content =~ s/#?htpasswd.*/htpasswd => 't\/lufi.passwd',/gm;
|
||||
$config_file->spurt($config_content);
|
||||
$config_file->spew($config_content);
|
||||
|
||||
Lufi::DB::Slice->new(app => $m)->delete_all;
|
||||
Lufi::DB::File->new(app => $m)->delete_all;
|
||||
|
@ -289,7 +289,7 @@ sub switch_to_htpasswd {
|
|||
sub switch_to_ldap {
|
||||
$config_content = $config_orig;
|
||||
$config_content =~ s/^( +)#?ldap => \{ uri/$1ldap => { uri/gm;
|
||||
$config_file->spurt($config_content);
|
||||
$config_file->spew($config_content);
|
||||
|
||||
Lufi::DB::Slice->new(app => $m)->delete_all;
|
||||
Lufi::DB::File->new(app => $m)->delete_all;
|
||||
|
@ -303,7 +303,7 @@ sub switch_to_ldap {
|
|||
sub switch_to_swift {
|
||||
$config_content = $config_orig;
|
||||
$config_content =~ s/^( +)#?swift => \{ auth_url/$1swift => { auth_url/gm;
|
||||
$config_file->spurt($config_content);
|
||||
$config_file->spew($config_content);
|
||||
|
||||
Lufi::DB::Slice->new(app => $m)->delete_all;
|
||||
Lufi::DB::File->new(app => $m)->delete_all;
|
||||
|
|
|
@ -39,6 +39,6 @@
|
|||
</table>
|
||||
</div>
|
||||
|
||||
%= javascript '/partial/files.js.ep'
|
||||
%= javascript '/partial/files.js'
|
||||
%= javascript '/js/lufi-files.js'
|
||||
%= javascript '/js/moment-with-locales.min.js'
|
||||
|
|
Loading…
Reference in New Issue