source: client/shared/lib/engine/tests/NoModify/File1.shtest @ 3ad779e

918-git-images-111dconfigure-oglivegit-imageslgromero-new-oglivemainmaint-cronmount-efivarfsmultivmmultivm-ogboot-installerogClonningEngineogboot-installer-jenkinsoglive-ipv6test-python-scriptsticket-301ticket-50ticket-50-oldticket-577ticket-585ticket-611ticket-612ticket-693ticket-700ubu24tplunification2use-local-agent-oglivevarios-instalacion
Last change on this file since 3ad779e was d0d4a3d, checked in by ramon <ramongomez@…>, 11 years ago

#616: Limpiar código eliminando antigua función ogNewPath,

git-svn-id: https://opengnsys.es/svn/branches/version1.0@4106 a21b9725-9963-47de-94b9-378ad31fedc9

  • Property mode set to 100644
File size: 2.3 KB
Line 
1Test de compribación de la libreria File No modifica nada
2========================================
3Este test NECESITA LA CACHE
4
5Comprobamos que existe CACHE
6$ ls -d $OGCAC$OGIMG            # Este test NECESITA LA CACHE ##############################
7/opt/opengnsys/cache/opt/opengnsys/images
8
9
10$ ogMakeDir CACHE prueba
11$ ls -d $OGCAC$OGIMG/prueba
12/opt/opengnsys/cache/opt/opengnsys/images/prueba
13
14$ touch $OGCAC$OGIMG/fichero_prueba
15$ ogCopyFile CACHE fichero_prueba CACHE prueba
16$ ls $OGCAC$OGIMG/prueba
17fichero_prueba
18
19$ ogGetPath CACHE fichero_prueba
20/opt/opengnsys/cache/opt/opengnsys/images/fichero_prueba
21
22# Si no existe el fichero
23$ ogGetPath CACHE fichero_prueba3; echo $?
241
25
26$ ogGetParentPath CACHE fichero_prueba
27/opt/opengnsys/cache/opt/opengnsys/images
28
29# si el fichero no existe
30$ ogGetParentPath CACHE prueba/fichero_prueba3q23
31/opt/opengnsys/cache/opt/opengnsys/images/prueba
32
33# Si dir padre no existe
34$ ogGetParentPath CACHE pruebaNO/fichero_prueba3; echo $?
351
36
37$ AUX=$(ogCalculateChecksum $OGCAC$OGIMG/fichero_prueba); AUX2=$(md5sum $OGCAC$OGIMG/fichero_prueba| cut -f1 -d\ ); if [ "$AUX" == "$AUX2"  ]; then echo si; else echo no; fi
38si
39
40$ ogCompareChecksumFiles CACHE fichero_prueba CACHE prueba/fichero_prueba; echo $?
410
42
43$ echo 333 >> $OGCAC$OGIMG/fichero_prueba2
44$ ogMakeChecksumFile CACHE fichero_prueba2
45$ ls $OGCAC$OGIMG/fichero_prueba2.sum
46/opt/opengnsys/cache/opt/opengnsys/images/fichero_prueba2.sum
47
48$ ogMakeChecksumFile CACHE prueba/fichero_prueba
49$ ogCompareChecksumFiles CACHE fichero_prueba2 CACHE prueba/fichero_prueba; echo $?
501
51
52$ ogIsNewerFile CACHE fichero_prueba2 CACHE prueba/fichero_prueba; echo $?
530
54
55$ ogIsNewerFile CACHE prueba/fichero_prueba CACHE fichero_prueba2; echo $?
561
57
58$ ogIsNewerFile CACHE fichero_prueba CACHE prueba/fichero_prueba; echo $?
591
60
61$ ogDeleteTree CACHE prueba
62$ ls -d $OGCAC$OGIMG/prueba
63ls: cannot access /opt/opengnsys/cache/opt/opengnsys/images/prueba: No such file or directory
64
65$ ogDeleteFile CACHE fichero_prueba
66$ ls $OGCAC$OGIMG/fichero_prueba
67ls: cannot access /opt/opengnsys/cache/opt/opengnsys/images/fichero_prueba: No such file or directory
68
69# Limpiamos el directorio
70$ rm -rf $OGCAC$OGIMG/fichero_prueba2* $OGCAC$OGIMG/prueba2
71
72
73MEJORAS
74=======
75ogCompareChecksumFiles -> si no existen los ficheros de Checksum da verdadero. Deberia dar falso
Note: See TracBrowser for help on using the repository browser.